changeset 1318:f95502c6fc72

Eliminate duplicate modes with different refresh rates
author Sam Lantinga <slouken@libsdl.org>
date Wed, 01 Feb 2006 09:28:42 +0000
parents 6c7b69218276
children 66f6c64c2c69
files src/video/x11/SDL_x11modes.c
diffstat 1 files changed, 7 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/video/x11/SDL_x11modes.c	Wed Feb 01 09:01:12 2006 +0000
+++ b/src/video/x11/SDL_x11modes.c	Wed Feb 01 09:28:42 2006 +0000
@@ -366,6 +366,13 @@
             for ( i=0; i<nmodes; ++i ) {
                 int w, h;
 
+		/* Eliminate duplicate modes with different refresh rates */
+		if ( i > 0 &&
+		     modes[i]->hdisplay == modes[i-1]->hdisplay &&
+		     modes[i]->vdisplay == modes[i-1]->vdisplay ) {
+			continue;
+		}
+
                 /* Check to see if we should add the screen size (Xinerama) */
                 w = modes[i]->hdisplay;
                 h = modes[i]->vdisplay;