mirror of
https://github.com/ZDoom/qzdoom-gpl.git
synced 2024-11-25 13:21:27 +00:00
- fixed: The display mode enumeration code could add a screen size multiple times if later ones had lower refresh rates.
This commit is contained in:
parent
8b3045e255
commit
0132c639b1
1 changed files with 2 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue