Mercurial > sdl-ios-xcode
comparison src/video/SDL_video.c @ 2789:985001797115
Fixed bug #605, per Martin's suggestion
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Tue, 25 Nov 2008 20:06:27 +0000 |
parents | 93764fe8601a |
children | 27cb878a278e |
comparison
equal
deleted
inserted
replaced
2788:44be910366a9 | 2789:985001797115 |
---|---|
486 | 486 |
487 match = NULL; | 487 match = NULL; |
488 for (i = 0; i < SDL_GetNumDisplayModes(); ++i) { | 488 for (i = 0; i < SDL_GetNumDisplayModes(); ++i) { |
489 current = &SDL_CurrentDisplay.display_modes[i]; | 489 current = &SDL_CurrentDisplay.display_modes[i]; |
490 | 490 |
491 if ((current->w && current->h) && | 491 if (current->w && (current->w < mode->w)) { |
492 (current->w < mode->w || current->h < mode->h)) { | |
493 /* Out of sorted modes large enough here */ | 492 /* Out of sorted modes large enough here */ |
494 break; | 493 break; |
494 } | |
495 if (current->h && (current->h < mode->h)) { | |
496 if (current->w && (current->w == mode->w)) { | |
497 /* Out of sorted modes large enough here */ | |
498 break; | |
499 } | |
500 /* Wider, but not tall enough, due to a different | |
501 aspect ratio. This mode must be skipped, but closer | |
502 modes may still follow. */ | |
503 continue; | |
495 } | 504 } |
496 if (!match || current->w < match->w || current->h < match->h) { | 505 if (!match || current->w < match->w || current->h < match->h) { |
497 match = current; | 506 match = current; |
498 continue; | 507 continue; |
499 } | 508 } |