# HG changeset patch # User Patrice Mandin # Date 1138212716 0 # Node ID a7bea6db3c3e451ac504a3f9b3f9fb6f932d87a8 # Parent 670e74bf5cc81c7245785257251e31e6361397fc SDL_GetVideoMode, part 3: pixel count compare was failing when only 1 video mode was present diff -r 670e74bf5cc8 -r a7bea6db3c3e src/video/SDL_video.c --- a/src/video/SDL_video.c Wed Jan 25 07:04:02 2006 +0000 +++ b/src/video/SDL_video.c Wed Jan 25 18:11:56 2006 +0000 @@ -489,7 +489,7 @@ /* 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; }