Commit 7109c9a2 authored by Patrice Mandin's avatar Patrice Mandin

SDL_GetVideoMode, part 3: pixel count compare was failing when only 1 video mode was present

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401269
parent ca8ee26f
......@@ -489,7 +489,7 @@ static int SDL_GetVideoMode (int *w, int *h, int *BitsPerPixel, Uint32 flags)
/* Mode with any dimension smaller or equal than current best ? */
if ((sizes[i]->w <= sizes[best]->w) || (sizes[i]->h <= sizes[best]->h)) {
/* Now choose the mode that has less pixels */
if ((sizes[i]->w * sizes[i]->h) < (sizes[best]->w * sizes[best]->h)) {
if ((sizes[i]->w * sizes[i]->h) <= (sizes[best]->w * sizes[best]->h)) {
best=i;
supported = 1;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment