mirror of
https://github.com/Ryujinx/SDL.git
synced 2024-12-24 12:05:26 +00:00
Fix up monitor enumeration for Windows 8.1 case.
This commit is contained in:
parent
e09d95c36a
commit
5aaf81c84e
|
@ -121,11 +121,16 @@ WIN_GetDisplayMode(_THIS, LPCTSTR deviceName, DWORD index, SDL_DisplayMode * mod
|
||||||
// so only call after those are set.
|
// so only call after those are set.
|
||||||
if (vid_data->GetDpiForMonitor) {
|
if (vid_data->GetDpiForMonitor) {
|
||||||
WIN_GetMonitorDPIData dpi_data;
|
WIN_GetMonitorDPIData dpi_data;
|
||||||
|
RECT monitor_rect;
|
||||||
|
|
||||||
dpi_data.vid_data = vid_data;
|
dpi_data.vid_data = vid_data;
|
||||||
dpi_data.mode = mode;
|
dpi_data.mode = mode;
|
||||||
dpi_data.mode_data = data;
|
dpi_data.mode_data = data;
|
||||||
EnumDisplayMonitors(hdc, NULL, WIN_GetMonitorDPI, (LPARAM)&dpi_data);
|
monitor_rect.left = devmode.dmPosition.x;
|
||||||
|
monitor_rect.top = devmode.dmPosition.y;
|
||||||
|
monitor_rect.right = monitor_rect.left + 1;
|
||||||
|
monitor_rect.bottom = monitor_rect.top + 1;
|
||||||
|
EnumDisplayMonitors(NULL, &monitor_rect, WIN_GetMonitorDPI, (LPARAM)&dpi_data);
|
||||||
} else {
|
} else {
|
||||||
// We don't have the Windows 8.1 routine so just
|
// We don't have the Windows 8.1 routine so just
|
||||||
// get system DPI.
|
// get system DPI.
|
||||||
|
|
Loading…
Reference in a new issue