diff --git a/src/win32/win32gliface.cpp b/src/win32/win32gliface.cpp index 2787d9128..c6715b0a7 100644 --- a/src/win32/win32gliface.cpp +++ b/src/win32/win32gliface.cpp @@ -259,6 +259,7 @@ void Win32GLVideo::AddMode(int x, int y, int bits, int baseHeight, int refreshHz // not present, add it to the right spot in the list; otherwise, do nothing. // Modes are sorted first by width, then by height, then by depth. In each // case the order is ascending. + if (bits < 32) return; for (; probe != 0; probep = &probe->next, probe = probe->next) { if (probe->width != x) continue; @@ -269,7 +270,7 @@ void Win32GLVideo::AddMode(int x, int y, int bits, int baseHeight, int refreshHz // Height is equal if (probe->bits != bits) continue; // Bits is equal - if (probe->refreshHz > refreshHz) continue; + if (probe->refreshHz > refreshHz) return; probe->refreshHz = refreshHz; return; }