Skip to content

Commit

Permalink
SDL_GetVideoMode, part 3: pixel count compare was failing when only 1…
Browse files Browse the repository at this point in the history
… video mode was present
  • Loading branch information
pmandin committed Jan 25, 2006
1 parent 5c127c5 commit 0647b35
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/video/SDL_video.c
Expand Up @@ -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;
}
Expand Down

0 comments on commit 0647b35

Please sign in to comment.