SDL_GetVideoMode, part 3: pixel count compare was failing when only 1 video mode was present
authorPatrice Mandin
Wed, 25 Jan 2006 18:11:56 +0000
changeset 1266a7bea6db3c3e
parent 1265 670e74bf5cc8
child 1267 fdc7ef6ecab4
SDL_GetVideoMode, part 3: pixel count compare was failing when only 1 video mode was present
src/video/SDL_video.c
     1.1 --- a/src/video/SDL_video.c	Wed Jan 25 07:04:02 2006 +0000
     1.2 +++ b/src/video/SDL_video.c	Wed Jan 25 18:11:56 2006 +0000
     1.3 @@ -489,7 +489,7 @@
     1.4  				/* Mode with any dimension smaller or equal than current best ? */
     1.5  				if ((sizes[i]->w <= sizes[best]->w) || (sizes[i]->h <= sizes[best]->h)) {
     1.6  					/* Now choose the mode that has less pixels */
     1.7 -					if ((sizes[i]->w * sizes[i]->h) < (sizes[best]->w * sizes[best]->h)) {
     1.8 +					if ((sizes[i]->w * sizes[i]->h) <= (sizes[best]->w * sizes[best]->h)) {
     1.9  						best=i;
    1.10  						supported = 1;
    1.11  					}