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
+9
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;