mirror of
https://github.com/yawut/SDL.git
synced 2026-04-25 15:58:04 -05:00
Fixed X11 mode line crash with only one video mode (thanks Alan!)
This commit is contained in:
parent
974d05bb9a
commit
76102d9c11
|
|
@ -120,7 +120,7 @@ static void set_best_resolution(_THIS, int width, int height)
|
|||
goto match;
|
||||
}
|
||||
qsort(modes, nmodes, sizeof *modes, cmpmodes);
|
||||
for ( i = nmodes-1; i >= 0 ; i-- ) {
|
||||
for ( i = nmodes-1; i > 0 ; i-- ) {
|
||||
if ( ! best_width ) {
|
||||
if ( (modes[i]->hdisplay >= width) &&
|
||||
(modes[i]->vdisplay >= height) ) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user