VirtualBox

Changeset 54114 in vbox


Ignore:
Timestamp:
Feb 9, 2015 2:58:30 PM (10 years ago)
Author:
vboxsync
Message:

FE/Qt, Main: 7678: Do not log the improper call to 3D-overlay rescaling when 3D is not enabled/allowed for the running VM; Assert instead.

Location:
trunk/src/VBox
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.cpp

    r54104 r54114  
    176176    const double dScaleFactor = gEDataManager->scaleFactor(vboxGlobal().managedVMUuid());
    177177    frameBuffer()->setScaleFactor(dScaleFactor);
    178     display().NotifyScaleFactorChange(m_uScreenId,
    179                                       (uint32_t)(dScaleFactor * VBOX_OGL_SCALE_FACTOR_MULTIPLIER),
    180                                       (uint32_t)(dScaleFactor * VBOX_OGL_SCALE_FACTOR_MULTIPLIER));
     178    /* Propagate scale-factor to 3D service if necessary: */
     179    if (machine().GetAccelerate3DEnabled() && vboxGlobal().is3DAvailable())
     180    {
     181        display().NotifyScaleFactorChange(m_uScreenId,
     182                                          (uint32_t)(dScaleFactor * VBOX_OGL_SCALE_FACTOR_MULTIPLIER),
     183                                          (uint32_t)(dScaleFactor * VBOX_OGL_SCALE_FACTOR_MULTIPLIER));
     184    }
    181185
    182186    /* Take unscaled HiDPI output mode into account: */
     
    363367    const double dScaleFactor = gEDataManager->scaleFactor(vboxGlobal().managedVMUuid());
    364368    frameBuffer()->setScaleFactor(dScaleFactor);
    365     display().NotifyScaleFactorChange(m_uScreenId,
    366                                       (uint32_t)(dScaleFactor * VBOX_OGL_SCALE_FACTOR_MULTIPLIER),
    367                                       (uint32_t)(dScaleFactor * VBOX_OGL_SCALE_FACTOR_MULTIPLIER));
     369    /* Propagate scale-factor to 3D service if necessary: */
     370    if (machine().GetAccelerate3DEnabled() && vboxGlobal().is3DAvailable())
     371    {
     372        display().NotifyScaleFactorChange(m_uScreenId,
     373                                          (uint32_t)(dScaleFactor * VBOX_OGL_SCALE_FACTOR_MULTIPLIER),
     374                                          (uint32_t)(dScaleFactor * VBOX_OGL_SCALE_FACTOR_MULTIPLIER));
     375    }
    368376
    369377    /* Handle scale attributes change: */
     
    548556        const double dScaleFactor = gEDataManager->scaleFactor(vboxGlobal().managedVMUuid());
    549557        m_pFrameBuffer->setScaleFactor(dScaleFactor);
    550         display().NotifyScaleFactorChange(m_uScreenId,
    551                                           (uint32_t)(dScaleFactor * VBOX_OGL_SCALE_FACTOR_MULTIPLIER),
    552                                           (uint32_t)(dScaleFactor * VBOX_OGL_SCALE_FACTOR_MULTIPLIER));
     558        /* Propagate scale-factor to 3D service if necessary: */
     559        if (machine().GetAccelerate3DEnabled() && vboxGlobal().is3DAvailable())
     560        {
     561            display().NotifyScaleFactorChange(m_uScreenId,
     562                                              (uint32_t)(dScaleFactor * VBOX_OGL_SCALE_FACTOR_MULTIPLIER),
     563                                              (uint32_t)(dScaleFactor * VBOX_OGL_SCALE_FACTOR_MULTIPLIER));
     564        }
    553565
    554566#ifdef Q_WS_MAC
  • trunk/src/VBox/Main/src-client/DisplayImpl.cpp

    r54053 r54114  
    35423542    }
    35433543    else
    3544         LogRel(("Attempt to specify OpenGL content scale factor while 3D acceleration is disabled in VM config. Ignored.\n"));
     3544        AssertMsgFailed(("Attempt to specify OpenGL content scale factor while 3D acceleration is disabled in VM config. Ignored.\n"));
    35453545
    35463546    return hr;
    35473547#else
    3548     LogRel(("Attempt to specify OpenGL content scale factor while corresponding functionality is disabled."));
     3548    AssertMsgFailed(("Attempt to specify OpenGL content scale factor while corresponding functionality is disabled."));
    35493549    return E_UNEXPECTED;
    35503550#endif /* VBOX_WITH_HGCM && VBOX_WITH_CROGL */
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette