From 8fd69bc6c2e6abf2ae92d644e08ff0951d57043f Mon Sep 17 00:00:00 2001 From: Camilla Berglund Date: Mon, 15 Sep 2014 17:08:50 +0200 Subject: [PATCH] Fixed monitor size using wrong incorrect value. The display device string was used, instead of the adapter device name, leading to the wrong incorrect physical size being returned for non-primary monitors. The right incorrect physical size is now returned for all monitors. --- README.md | 2 ++ src/win32_monitor.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 8fbcdc81..6d03b7c5 100644 --- a/README.md +++ b/README.md @@ -99,6 +99,8 @@ GLFW bundles a number of dependencies in the `deps/` directory. systems - [Win32] Bugfix: Gamma ramp functions acted on entire desktop instead of the specified monitor + - [Win32] Bugfix: The wrong incorrect physical size was returned for + non-primary monitors - [X11] Added run-time support for systems lacking the XKB extension - [X11] Made GLX 1.3 the minimum supported version - [X11] Replaced `XRRGetScreenResources` with `XRRGetScreenResourcesCurrent` diff --git a/src/win32_monitor.c b/src/win32_monitor.c index 0c052ecb..573de880 100644 --- a/src/win32_monitor.c +++ b/src/win32_monitor.c @@ -144,7 +144,7 @@ _GLFWmonitor** _glfwPlatformGetMonitors(int* count) display.cb = sizeof(DISPLAY_DEVICEW); EnumDisplayDevicesW(adapter.DeviceName, 0, &display, 0); - dc = CreateDCW(L"DISPLAY", display.DeviceString, NULL, NULL); + dc = CreateDCW(L"DISPLAY", adapter.DeviceName, NULL, NULL); if (adapter.StateFlags & DISPLAY_DEVICE_PRIMARY_DEVICE) primaryIndex = found;