- Timestamp:
- Oct 4, 2013 5:38:17 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMultiScreenLayout.cpp
r48503 r48892 28 28 #include "UIActionPoolRuntime.h" 29 29 #include "UIMachineLogic.h" 30 #include "UIFrameBuffer.h" 30 31 #include "UISession.h" 31 32 #include "UIMessageCenter.h" … … 160 161 /* We have to try to enable disabled guest-screens if any: */ 161 162 int cGuestScreensToEnable = qMin(cExcessiveHostScreens, cDisabledGuestScreens); 163 UISession *pSession = m_pMachineLogic->uisession(); 162 164 for (int iGuestScreenIndex = 0; iGuestScreenIndex < cGuestScreensToEnable; ++iGuestScreenIndex) 163 165 { 164 /* Get corresponding guest-screen: */ 166 /* Defaults: */ 167 ULONG uWidth = 800; 168 ULONG uHeight = 600; 169 /* Try to get previous guest-screen arguments: */ 165 170 int iGuestScreen = m_disabledGuestScreens[iGuestScreenIndex]; 166 /* Re-enable guest-screen with 'default' arguments: */ 167 LogRelFlow(("UIMultiScreenLayout::update: Enabling guest-screen %d.\n", iGuestScreen)); 168 display.SetVideoModeHint(iGuestScreen, true, false, 0, 0, 800, 600, 32); 171 if (UIFrameBuffer *pFrameBuffer = pSession->frameBuffer(iGuestScreen)) 172 { 173 if (pFrameBuffer->width() > 0) 174 uWidth = pFrameBuffer->width(); 175 if (pFrameBuffer->height() > 0) 176 uHeight = pFrameBuffer->height(); 177 } 178 /* Re-enable guest-screen with proper resolution: */ 179 LogRelFlow(("UIMultiScreenLayout::update: Enabling guest-screen %d with following resolution: %dx%d.\n", 180 iGuestScreen, uWidth, uHeight)); 181 display.SetVideoModeHint(iGuestScreen, true, false, 0, 0, uWidth, uHeight, 32); 169 182 } 170 183 }
Note:
See TracChangeset
for help on using the changeset viewer.