src/video/x11/SDL_x11modes.c
changeset 604 31d3af76488b
parent 499 f480ecd70499
child 607 f8710950cddc
--- a/src/video/x11/SDL_x11modes.c	Thu Mar 06 05:57:29 2003 +0000
+++ b/src/video/x11/SDL_x11modes.c	Thu Mar 06 06:02:16 2003 +0000
@@ -113,10 +113,16 @@
             }
 #endif
             for ( i = nmodes-1; i > 0 ; --i ) {
+                if ( (modes[i]->hdisplay == width) &&
+                     (modes[i]->vdisplay == height) )
+                    goto match;
+            }
+            for ( i = nmodes-1; i > 0 ; --i ) {
                 if ( (modes[i]->hdisplay >= width) &&
                      (modes[i]->vdisplay >= height) )
                     break;
             }
+       match:
             if ( (modes[i]->hdisplay != mode.hdisplay) ||
                  (modes[i]->vdisplay != mode.vdisplay) ) {
                 SDL_NAME(XF86VidModeSwitchToMode)(SDL_Display, SDL_Screen, modes[i]);