diff src/video/dga/SDL_dgavideo.c @ 966:f72cc0c7305f

Video modes are sorted width first, then height
author Sam Lantinga <slouken@libsdl.org>
date Fri, 12 Nov 2004 21:25:42 +0000
parents b8d311d90021
children 045f186426e1
line wrap: on
line diff
--- a/src/video/dga/SDL_dgavideo.c	Fri Nov 12 21:24:46 2004 +0000
+++ b/src/video/dga/SDL_dgavideo.c	Fri Nov 12 21:25:42 2004 +0000
@@ -284,15 +284,15 @@
     /* Prefer DirectColor visuals for otherwise equal modes */
     if ( (a->viewportWidth == b->viewportWidth) &&
          (b->viewportHeight == a->viewportHeight) ) {
-         if ( a->visualClass == DirectColor )
-             return -1;
-         if ( b->visualClass == DirectColor )
-             return 1;
-         return 0;
+        if ( a->visualClass == DirectColor )
+            return -1;
+        if ( b->visualClass == DirectColor )
+            return 1;
+        return 0;
+    } else if ( a->viewportWidth == b->viewportWidth ) {
+        return b->viewportHeight - a->viewportHeight;
     } else {
-        if(a->viewportWidth > b->viewportWidth)
-            return -1;
-        return b->viewportHeight - a->viewportHeight;
+        return b->viewportWidth - a->viewportWidth;
     }
 }
 static void UpdateHWInfo(_THIS, SDL_NAME(XDGAMode) *mode)