Changeset 27185 in vbox
- Timestamp:
- Mar 8, 2010 6:13:23 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/WINNT/VBoxTray/VBoxDisplay.cpp
r26562 r27185 323 323 * mode table but uses an internal cache instead. 324 324 */ 325 DEVMODE tempDevMode; 326 ZeroMemory (&tempDevMode, sizeof (tempDevMode)); 327 tempDevMode.dmSize = sizeof(DEVMODE); 328 EnumDisplaySettings(NULL, 0xffffff, &tempDevMode); 325 for (i = 0; i < NumDevices; i++) 326 { 327 DEVMODE tempDevMode; 328 ZeroMemory (&tempDevMode, sizeof (tempDevMode)); 329 tempDevMode.dmSize = sizeof(DEVMODE); 330 EnumDisplaySettings((LPSTR)paDisplayDevices[i].DeviceName, 0xffffff, &tempDevMode); 331 Log(("ResizeDisplayDevice: EnumDisplaySettings last error %d\n", GetLastError ())); 332 } 329 333 330 334 /* Assign the new rectangles to displays. */ … … 356 360 paDeviceModes[i].dmPosition.y)); 357 361 358 gCtx.pfnChangeDisplaySettingsEx((LPSTR)paDisplayDevices[i].DeviceName,362 LONG status = gCtx.pfnChangeDisplaySettingsEx((LPSTR)paDisplayDevices[i].DeviceName, 359 363 &paDeviceModes[i], NULL, CDS_NORESET | CDS_UPDATEREGISTRY, NULL); 360 Log(("ResizeDisplayDevice: ChangeDisplaySettingsEx position err %d\n", GetLastError ()));364 Log(("ResizeDisplayDevice: ChangeDisplaySettingsEx position status %d, err %d\n", status, GetLastError ())); 361 365 } 362 366 363 367 /* A second call to ChangeDisplaySettings updates the monitor. */ 364 LONG status = ChangeDisplaySettings(NULL, 0);368 LONG status = gCtx.pfnChangeDisplaySettingsEx(NULL, NULL, NULL, 0, NULL); 365 369 Log(("ResizeDisplayDevice: ChangeDisplaySettings update status %d\n", status)); 366 370 if (status == DISP_CHANGE_SUCCESSFUL || status == DISP_CHANGE_BADMODE)
Note:
See TracChangeset
for help on using the changeset viewer.