comparison 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
comparison
equal deleted inserted replaced
965:b68e551205e9 966:f72cc0c7305f
83 #ifdef XFREE86_VM 83 #ifdef XFREE86_VM
84 static int cmpmodes(const void *va, const void *vb) 84 static int cmpmodes(const void *va, const void *vb)
85 { 85 {
86 const SDL_NAME(XF86VidModeModeInfo) *a = *(const SDL_NAME(XF86VidModeModeInfo)**)va; 86 const SDL_NAME(XF86VidModeModeInfo) *a = *(const SDL_NAME(XF86VidModeModeInfo)**)va;
87 const SDL_NAME(XF86VidModeModeInfo) *b = *(const SDL_NAME(XF86VidModeModeInfo)**)vb; 87 const SDL_NAME(XF86VidModeModeInfo) *b = *(const SDL_NAME(XF86VidModeModeInfo)**)vb;
88 if( (a->vdisplay > b->vdisplay) && (a->hdisplay >= b->hdisplay) ) 88 if ( a->hdisplay == b->hdisplay )
89 return -1; 89 return b->vdisplay - a->vdisplay;
90 return b->hdisplay - a->hdisplay; 90 else
91 return b->hdisplay - a->hdisplay;
91 } 92 }
92 #endif 93 #endif
93 94
94 static void get_real_resolution(_THIS, int* w, int* h); 95 static void get_real_resolution(_THIS, int* w, int* h);
95 96