mirror of
https://github.com/yawut/SDL.git
synced 2026-07-30 07:02:07 -05:00
SDL_GetVideoMode, part 3: pixel count compare was failing when only 1 video mode was present
This commit is contained in:
parent
cefbe73b27
commit
f9db8339c3
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user