Skip to content
Permalink
Browse files

SDL_GetVideoMode, part 3: pixel count compare was failing when only 1…

… video mode was present
  • Loading branch information
pmandin committed Jan 25, 2006
1 parent 5c127c5 commit 0647b3517d869493f1c1577b7c8d66fb3d74b8db
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/video/SDL_video.c
@@ -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;
}

0 comments on commit 0647b35

Please sign in to comment.