diff --git a/README.md b/README.md index 14d7516b..174bbe83 100644 --- a/README.md +++ b/README.md @@ -67,6 +67,7 @@ GLFW bundles a number of dependencies in the `deps/` directory. - Bugfix: The cached current context could get out of sync - [Win32] Renamed hybrid GPU override compile-time option to `_GLFW_USE_HYBRID_HPG` and added support for AMD PowerXpress systems + - [Win32] Bugfix: `glfwGetVideoModes` included unusable modes on some systems - [Cocoa] Bugfix: The cached `NSScreen` for a monitor could get out of sync - [Cocoa] Bugfix: The `GLFW_AUTO_ICONIFY` window hint was ignored - [Cocoa] Bugfix: Resizing a window to its minimum size would segfault diff --git a/src/win32_monitor.c b/src/win32_monitor.c index 19ecc146..be5686f8 100644 --- a/src/win32_monitor.c +++ b/src/win32_monitor.c @@ -226,6 +226,15 @@ GLFWvidmode* _glfwPlatformGetVideoModes(_GLFWmonitor* monitor, int* count) modeIndex++; + if (ChangeDisplaySettingsExW(monitor->win32.adapterName, + &dm, + NULL, + CDS_TEST, + NULL) != DISP_CHANGE_SUCCESSFUL) + { + continue; + } + // Skip modes with less than 15 BPP if (dm.dmBitsPerPel < 15) continue;