VirtualBox

Changeset 40188 in vbox for trunk/src/VBox/Main/src-client


Ignore:
Timestamp:
Feb 21, 2012 8:32:47 AM (13 years ago)
Author:
vboxsync
Message:

Main: disable 3D support for the guest if the availabilty test was not successful (e.g. host 3D drivers busted)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-client/ConsoleImpl2.cpp

    r40078 r40188  
    17291729            ComPtr<INetworkAdapter> networkAdapter;
    17301730            hrc = pMachine->GetNetworkAdapter(ulInstance, networkAdapter.asOutParam());     H();
    1731             BOOL fEnabled = FALSE;
    1732             hrc = networkAdapter->COMGETTER(Enabled)(&fEnabled);                            H();
    1733             if (!fEnabled)
     1731            BOOL fEnabledNetAdapter = FALSE;
     1732            hrc = networkAdapter->COMGETTER(Enabled)(&fEnabledNetAdapter);                  H();
     1733            if (!fEnabledNetAdapter)
    17341734                continue;
    17351735
     
    19441944            ComPtr<ISerialPort> serialPort;
    19451945            hrc = pMachine->GetSerialPort(ulInstance, serialPort.asOutParam());             H();
    1946             BOOL fEnabled = FALSE;
     1946            BOOL fEnabledSerPort = FALSE;
    19471947            if (serialPort)
    1948                 hrc = serialPort->COMGETTER(Enabled)(&fEnabled);                            H();
    1949             if (!fEnabled)
     1948                hrc = serialPort->COMGETTER(Enabled)(&fEnabledSerPort);                     H();
     1949            if (!fEnabledSerPort)
    19501950                continue;
    19511951
     
    20052005            ComPtr<IParallelPort> parallelPort;
    20062006            hrc = pMachine->GetParallelPort(ulInstance, parallelPort.asOutParam());         H();
    2007             BOOL fEnabled = FALSE;
     2007            BOOL fEnabledParPort = FALSE;
    20082008            if (parallelPort)
    20092009            {
    2010                 hrc = parallelPort->COMGETTER(Enabled)(&fEnabled);                          H();
    2011             }
    2012             if (!fEnabled)
     2010                hrc = parallelPort->COMGETTER(Enabled)(&fEnabledParPort);                   H();
     2011            }
     2012            if (!fEnabledParPort)
    20132013                continue;
    20142014
     
    25012501         */
    25022502        {
    2503             BOOL fEnabled = false;
    2504             hrc = pMachine->COMGETTER(Accelerate3DEnabled)(&fEnabled); H();
    2505 
    2506             if (fEnabled)
     2503            BOOL fEnabled3D = false;
     2504            hrc = pMachine->COMGETTER(Accelerate3DEnabled)(&fEnabled3D); H();
     2505
     2506            if (fEnabled3D)
     2507            {
     2508                BOOL fSupports3D = false;
     2509                hrc = host->COMGETTER(Acceleration3DAvailable)(&fSupports3D); H();
     2510                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)
    25072522            {
    25082523                /* Load the service */
     
    46134628                        {
    46144629                            /* there is a DHCP server available for this network */
    4615                             BOOL fEnabled;
    4616                             hrc = dhcpServer->COMGETTER(Enabled)(&fEnabled);
     4630                            BOOL fEnabledDhcp;
     4631                            hrc = dhcpServer->COMGETTER(Enabled)(&fEnabledDhcp);
    46174632                            if (FAILED(hrc))
    46184633                            {
     
    46214636                            }
    46224637
    4623                             if (fEnabled)
     4638                            if (fEnabledDhcp)
    46244639                                hrc = dhcpServer->Start(networkName.raw(),
    46254640                                                        trunkName.raw(),
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