VirtualBox

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


Ignore:
Timestamp:
Nov 18, 2019 8:42:02 PM (5 years ago)
Author:
vboxsync
Message:

Main/GraphicsAdapter: Split off a few attributes from Machine interface, which affects quite a few other interfaces.
Frontends/VirtualBox+VBoxManage+VBoxSDL+VBoxShell: Adapt accordingly.

Location:
trunk/src/VBox/Main/src-client
Files:
3 edited

Legend:

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

    r81883 r81964  
    16341634         * VGA.
    16351635         */
     1636        ComPtr<IGraphicsAdapter> pGraphicsAdapter;
     1637        hrc = pMachine->COMGETTER(GraphicsAdapter)(pGraphicsAdapter.asOutParam());           H();
    16361638        GraphicsControllerType_T enmGraphicsController;
    1637         hrc = pMachine->COMGETTER(GraphicsControllerType)(&enmGraphicsController);          H();
     1639        hrc = pGraphicsAdapter->COMGETTER(GraphicsControllerType)(&enmGraphicsController);          H();
    16381640        switch (enmGraphicsController)
    16391641        {
     
    16471649#endif
    16481650            case GraphicsControllerType_VBoxVGA:
    1649                 rc = i_configGraphicsController(pDevices, enmGraphicsController, pBusMgr, pMachine, biosSettings,
     1651                rc = i_configGraphicsController(pDevices, enmGraphicsController, pBusMgr, pMachine, pGraphicsAdapter, biosSettings,
    16501652                                                RT_BOOL(fHMEnabled));
    16511653                if (FAILED(rc))
     
    37593761                                        BusAssignmentManager *pBusMgr,
    37603762                                        const ComPtr<IMachine> &ptrMachine,
     3763                                        const ComPtr<IGraphicsAdapter> &ptrGraphicsAdapter,
    37613764                                        const ComPtr<IBIOSSettings> &ptrBiosSettings,
    37623765                                        bool fHMEnabled)
     
    37783781        InsertConfigNode(pInst,    "Config", &pCfg);
    37793782        ULONG cVRamMBs;
    3780         hrc = ptrMachine->COMGETTER(VRAMSize)(&cVRamMBs);                                   H();
     3783        hrc = ptrGraphicsAdapter->COMGETTER(VRAMSize)(&cVRamMBs);                           H();
    37813784        InsertConfigInteger(pCfg,  "VRamSize",             cVRamMBs * _1M);
    37823785        ULONG cMonitorCount;
    3783         hrc = ptrMachine->COMGETTER(MonitorCount)(&cMonitorCount);                          H();
     3786        hrc = ptrGraphicsAdapter->COMGETTER(MonitorCount)(&cMonitorCount);                  H();
    37843787        InsertConfigInteger(pCfg,  "MonitorCount",         cMonitorCount);
    37853788#ifdef VBOX_WITH_2X_4GB_ADDR_SPACE
     
    37893792#endif
    37903793        BOOL f3DEnabled;
    3791         hrc = ptrMachine->COMGETTER(Accelerate3DEnabled)(&f3DEnabled);                      H();
     3794        hrc = ptrGraphicsAdapter->COMGETTER(Accelerate3DEnabled)(&f3DEnabled);              H();
    37923795        InsertConfigInteger(pCfg,  "3DEnabled",            f3DEnabled);
    37933796
  • trunk/src/VBox/Main/src-client/ConsoleVRDPServer.cpp

    r81682 r81964  
    618618        case VRDE_QP_NUMBER_MONITORS:
    619619        {
    620             ULONG cMonitors = 1;
    621 
    622             server->mConsole->i_machine()->COMGETTER(MonitorCount)(&cMonitors);
     620            uint32_t cMonitors = server->mConsole->i_getDisplay()->i_getMonitorCount();
    623621
    624622            if (cbBuffer >= sizeof(uint32_t))
  • trunk/src/VBox/Main/src-client/DisplayImpl.cpp

    r80872 r81964  
    484484    fVGAResizing = false;
    485485
     486    ComPtr<IGraphicsAdapter> pGraphicsAdapter;
     487    HRESULT hrc = mParent->i_machine()->COMGETTER(GraphicsAdapter)(pGraphicsAdapter.asOutParam());
     488    AssertComRCReturnRC(hrc);
     489    AssertReturn(!pGraphicsAdapter.isNull(), E_FAIL);
     490
    486491    ULONG ul;
    487     mParent->i_machine()->COMGETTER(MonitorCount)(&ul);
     492    pGraphicsAdapter->COMGETTER(MonitorCount)(&ul);
    488493    mcMonitors = ul;
    489494    xInputMappingOrigin = 0;
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