VirtualBox

Changeset 40192 in vbox


Ignore:
Timestamp:
Feb 21, 2012 10:46:37 AM (13 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
76356
Message:

3D check: don't prevent the user from enabling 3D acceleration in the VM settings but fail to start the VM if 3D is not available on the host

Location:
trunk/src/VBox
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/selector/UIVMDesktop.cpp

    r39983 r40192  
    842842                accel << tr("2D Video", "details report");
    843843#endif /* VBOX_WITH_VIDEOHWACCEL */
    844             if (   vboxGlobal().is3DAvailable()
    845                 && m_machine.GetAccelerate3DEnabled())
     844            if (m_machine.GetAccelerate3DEnabled())
    846845                accel << tr("3D", "details report");
    847846
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsDisplay.cpp

    r39800 r40192  
    325325    checkVRAMRequirements();
    326326
     327    if (mCb3D->isChecked() && !vboxGlobal().is3DAvailable())
     328    {
     329        strWarning = tr("you enabled 3D acceleration. However, 3D acceleration is not "
     330                        "working on the current host setup so you will not be able to "
     331                        "start the VM.");
     332        return true;
     333    }
     334
    327335    /* Video RAM amount test: */
    328336    if (shouldWeWarnAboutLowVideoMemory() && !m_guestOSType.isNull())
     
    523531    mLeMonitors->setEnabled(isMachineOffline());
    524532    mLbOptions->setEnabled(isMachineOffline());
    525     if (vboxGlobal().is3DAvailable())
    526         mCb3D->setEnabled(isMachineOffline());
    527     else
    528     {
    529         mCb3D->setEnabled(false);
    530         mCb3D->setChecked(false);
    531     }
     533    mCb3D->setEnabled(isMachineOffline());
    532534#ifdef VBOX_WITH_VIDEOHWACCEL
    533535    mCb2DVideo->setEnabled(isMachineOffline() && VBoxGlobal::isAcceleration2DVideoAvailable());
  • trunk/src/VBox/Main/src-client/ConsoleImpl2.cpp

    r40188 r40192  
    25092509                hrc = host->COMGETTER(Acceleration3DAvailable)(&fSupports3D); H();
    25102510                if (!fSupports3D)
    2511                 {
    2512                     setVMRuntimeErrorCallbackF(pVM, this, 0,
    2513                             "Accel3DNotAvailable",
    2514                             N_("This VM was configured to use 3D support. However, the "
    2515                                "3D support of the host is not working properly. Therefore "
    2516                                "3D support for the guest has been disabled"));
    2517                     fEnabled3D = false;
    2518                 }
    2519             }
    2520 
    2521             if (fEnabled3D)
    2522             {
     2511                    return VMSetError(pVM, VERR_NOT_AVAILABLE, RT_SRC_POS,
     2512                            N_("This VM was configured to use 3D acceleration. However, the "
     2513                               "3D support of the host is not working properly and the "
     2514                               "VM cannot be started. To fix this problem, either "
     2515                               "fix the host 3D support (update the host graphics driver?) "
     2516                               "or disable 3D acceleration in the VM settings"));
     2517
    25232518                /* Load the service */
    25242519                rc = pVMMDev->hgcmLoadService("VBoxSharedCrOpenGL", "VBoxSharedCrOpenGL");
Note: See TracChangeset for help on using the changeset viewer.

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