VirtualBox

Changeset 98686 in vbox for trunk/src/VBox/Frontends


Ignore:
Timestamp:
Feb 22, 2023 2:45:22 PM (2 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
155986
Message:

FE/Qt: bugref:10322: Runtime UI: Small cleanup and fixes for UISession COM wrappers.

File:
1 edited

Legend:

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

    r98675 r98686  
    262262{
    263263    CMachine comMachine = machine();
    264     KMachineState enmMachineState = comMachine.GetState();
     264    const KMachineState enmMachineState = comMachine.GetState();
    265265    const bool fSuccess = comMachine.isOk();
    266266    if (!fSuccess)
     
    719719            UINotificationMessage::cannotAcquireGraphicsAdapterParameter(comAdapter);
    720720        else
    721             fEnabled = fAccelerate3DEnabeld;
     721            fEnabled = fAccelerate3DEnabeld == TRUE;
    722722    }
    723723    return fSuccess;
     
    756756    if (!fSuccess)
    757757        UINotificationMessage::cannotAcquireDisplayParameter(comDisplay);
    758     uWidth = uGuestWidth;
    759     uHeight = uGuestHeight;
    760     uBitsPerPixel = uGuestBitsPerPixel;
    761     xOrigin = iGuestXOrigin;
    762     yOrigin = iGuestYOrigin;
    763     enmMonitorStatus = enmGuestMonitorStatus;
     758    else
     759    {
     760        uWidth = uGuestWidth;
     761        uHeight = uGuestHeight;
     762        uBitsPerPixel = uGuestBitsPerPixel;
     763        xOrigin = iGuestXOrigin;
     764        yOrigin = iGuestYOrigin;
     765        enmMonitorStatus = enmGuestMonitorStatus;
     766    }
    764767    return fSuccess;
    765768}
     
    782785{
    783786    CDisplay comDisplay = display();
    784     BOOL fGuestEnabled = false, fGuestChangeOrigin = false;
     787    BOOL fGuestEnabled = FALSE, fGuestChangeOrigin = FALSE;
    785788    LONG iGuestXOrigin = 0, iGuestYOrigin = 0;
    786789    ULONG uGuestWidth = 0, uGuestHeight = 0, uGuestBitsPerPixel = 0;
     
    791794    if (!fSuccess)
    792795        UINotificationMessage::cannotAcquireDisplayParameter(comDisplay);
    793     fEnabled = fGuestEnabled;
    794     fChangeOrigin = fGuestChangeOrigin;
    795     xOrigin = iGuestXOrigin;
    796     yOrigin = iGuestYOrigin;
    797     uWidth = uGuestWidth;
    798     uHeight = uGuestHeight;
    799     uBitsPerPixel = uGuestBitsPerPixel;
     796    else
     797    {
     798        fEnabled = fGuestEnabled == TRUE;
     799        fChangeOrigin = fGuestChangeOrigin == TRUE;
     800        xOrigin = iGuestXOrigin;
     801        yOrigin = iGuestYOrigin;
     802        uWidth = uGuestWidth;
     803        uHeight = uGuestHeight;
     804        uBitsPerPixel = uGuestBitsPerPixel;
     805    }
    800806    return fSuccess;
    801807}
     
    895901{
    896902    CConsole comConsole = console();
    897     states = comConsole.GetDeviceActivity(deviceTypes);
     903    const QVector<KDeviceActivity> currentStates = comConsole.GetDeviceActivity(deviceTypes);
    898904    const bool fSuccess = comConsole.isOk();
    899905    if (!fSuccess)
    900906        UINotificationMessage::cannotAcquireConsoleParameter(comConsole);
     907    else
     908        states = currentStates;
    901909    return fSuccess;
    902910}
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