mirror of
https://github.com/kovidgoyal/kitty
synced 2026-06-06 01:05:48 +02:00
Fix comparison of video modes of equal area
This fixes the bug of video modes being discarded if they had
a different resolution but the same area as another mode.
Upstream: 2777f6a754
This commit is contained in:
4
glfw/monitor.c
vendored
4
glfw/monitor.c
vendored
@@ -56,6 +56,10 @@ static int compareVideoModes(const void* fp, const void* sp)
|
||||
if (farea != sarea)
|
||||
return farea - sarea;
|
||||
|
||||
// Then sort on width
|
||||
if (fm->width != sm->width)
|
||||
return fm->width - sm->width;
|
||||
|
||||
// Lastly sort on refresh rate
|
||||
return fm->refreshRate - sm->refreshRate;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user