Mercurial > sdl-ios-xcode
diff src/video/x11/SDL_x11modes.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/x11/SDL_x11modes.c Fri Nov 12 21:24:46 2004 +0000 +++ b/src/video/x11/SDL_x11modes.c Fri Nov 12 21:25:42 2004 +0000 @@ -85,9 +85,10 @@ { const SDL_NAME(XF86VidModeModeInfo) *a = *(const SDL_NAME(XF86VidModeModeInfo)**)va; const SDL_NAME(XF86VidModeModeInfo) *b = *(const SDL_NAME(XF86VidModeModeInfo)**)vb; - if( (a->vdisplay > b->vdisplay) && (a->hdisplay >= b->hdisplay) ) - return -1; - return b->hdisplay - a->hdisplay; + if ( a->hdisplay == b->hdisplay ) + return b->vdisplay - a->vdisplay; + else + return b->hdisplay - a->hdisplay; } #endif