Changeset 52189 in vbox for trunk/src/VBox/Additions/x11/VBoxClient/display.cpp
- Timestamp:
- Jul 25, 2014 2:09:02 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/x11/VBoxClient/display.cpp
r52177 r52189 219 219 static void runDisplay(struct x11State *pState) 220 220 { 221 int status, rc, i; 221 int status, rc; 222 unsigned i, cScreens; 222 223 char szCommand[256]; 223 224 Cursor hClockCursor = XCreateFontCursor(pState->pDisplay, XC_watch); … … 225 226 226 227 LogRelFlowFunc(("\n")); 227 /** @todo fix this not to use a hard-coded value. */ 228 for (i = 0; i < 64; ++i) 228 rc = VbglR3VideoModeGetHighestSavedScreen(&cScreens); 229 if (RT_FAILURE(rc)) 230 FatalError(("Failed to get the number of saved screen modes, rc=%Rrc\n", 231 rc)); 232 for (i = 0; i < RT_MAX(cScreens + 1, 8); ++i) 229 233 { 230 234 unsigned cx = 0, cy = 0, cBPP = 0, x = 0, y = 0; … … 233 237 rc = VbglR3RetrieveVideoMode(i, &cx, &cy, &cBPP, &x, &y, 234 238 &fEnabled); 239 if (RT_SUCCESS(rc) && i > cScreens) /* Sanity */ 240 FatalError(("Internal error retrieving the number of saved screen modes.\n")); 235 241 if (RT_SUCCESS(rc)) 236 242 setModeX11(pState, cx, cy, cBPP, i, x, y, fEnabled, … … 298 304 rc = VbglR3SeamlessGetLastEvent(&Mode); 299 305 if (RT_FAILURE(rc)) 300 FatalError(("Failed to save size hint, rc=%Rrc\n", rc));306 FatalError(("Failed to check seamless mode, rc=%Rrc\n", rc)); 301 307 if (Mode == VMMDev_Seamless_Disabled) 302 308 {
Note:
See TracChangeset
for help on using the changeset viewer.