VirtualBox

Changeset 27185 in vbox


Ignore:
Timestamp:
Mar 8, 2010 6:13:23 PM (15 years ago)
Author:
vboxsync
Message:

Windows guest additions multimonitor: update the video mode table for every monitor (xTracker 4655).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/WINNT/VBoxTray/VBoxDisplay.cpp

    r26562 r27185  
    323323     * mode table but uses an internal cache instead.
    324324     */
    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    }
    329333
    330334    /* Assign the new rectangles to displays. */
     
    356360              paDeviceModes[i].dmPosition.y));
    357361
    358         gCtx.pfnChangeDisplaySettingsEx((LPSTR)paDisplayDevices[i].DeviceName,
     362        LONG status = gCtx.pfnChangeDisplaySettingsEx((LPSTR)paDisplayDevices[i].DeviceName,
    359363                                        &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 ()));
    361365    }
    362366
    363367    /* A second call to ChangeDisplaySettings updates the monitor. */
    364     LONG status = ChangeDisplaySettings(NULL, 0);
     368    LONG status = gCtx.pfnChangeDisplaySettingsEx(NULL, NULL, NULL, 0, NULL);
    365369    Log(("ResizeDisplayDevice: ChangeDisplaySettings update status %d\n", status));
    366370    if (status == DISP_CHANGE_SUCCESSFUL || status == DISP_CHANGE_BADMODE)
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