Fixed enumeration of invalid video modes.

Fixes #350.
This commit is contained in:
Camilla Berglund 2015-06-07 14:35:12 +02:00
parent 8503d53018
commit bb50368d55
2 changed files with 10 additions and 0 deletions

View File

@ -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

View File

@ -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;