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.

Fixes #1555.
Closes #1556.

(cherry picked from commit 2777f6a754)
This commit is contained in:
httpdigest 2019-08-31 02:44:04 +02:00 коммит произвёл Camilla Löwy
Родитель 71cfafe2f9
Коммит b2919dca4b
1 изменённых файлов: 4 добавлений и 0 удалений

Просмотреть файл

@ -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;
}