mirror of
https://github.com/ZDoom/qzdoom-gpl.git
synced 2024-11-29 07:02:03 +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.
|
// 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
|
// Modes are sorted first by width, then by height, then by depth. In each
|
||||||
// case the order is ascending.
|
// case the order is ascending.
|
||||||
|
if (bits < 32) return;
|
||||||
for (; probe != 0; probep = &probe->next, probe = probe->next)
|
for (; probe != 0; probep = &probe->next, probe = probe->next)
|
||||||
{
|
{
|
||||||
if (probe->width != x) continue;
|
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
|
// Height is equal
|
||||||
if (probe->bits != bits) continue;
|
if (probe->bits != bits) continue;
|
||||||
// Bits is equal
|
// Bits is equal
|
||||||
if (probe->refreshHz > refreshHz) continue;
|
if (probe->refreshHz > refreshHz) return;
|
||||||
probe->refreshHz = refreshHz;
|
probe->refreshHz = refreshHz;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue