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: https://github.com/glfw/glfw/commit/2777f6a754a469eb9b71b4d241ca5f3b1ce5a9b1
This commit is contained in:
Kovid Goyal
2019-09-08 09:12:39 +05:30
parent 931cb223cd
commit 9dbc54aad6
+4
View File
@@ -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;
}