- /*
- * OKi, this is the display mode we have been looking for...
- */
- XF86VidModeSwitchToMode(
- fgDisplay.Display,
- fgDisplay.Screen,
- displayModes[ i ]
- );
-
- /*
- * In case this will be the last X11 call we do before exit,
- * we've to flush the X11 output queue to be sure the command
- * is really brought onto it's way to the X server.
- * The application should not do this because it
- * would not be platform independent then.
- */
- XFlush(fgDisplay.Display);
-
- return;
+ if( displayModes[ i ]->hdisplay == fgDisplay.DisplayMode.hdisplay &&
+ displayModes[ i ]->vdisplay == fgDisplay.DisplayMode.vdisplay &&
+ displayModes[ i ]->dotclock == fgDisplay.DisplayModeClock )
+ {
+ /*
+ * OKi, this is the display mode we have been looking for...
+ */
+ XF86VidModeSwitchToMode(
+ fgDisplay.Display,
+ fgDisplay.Screen,
+ displayModes[ i ]
+ );
+
+ /*
+ * In case this will be the last X11 call we do before exit,
+ * we've to flush the X11 output queue to be sure the command
+ * is really brought onto it's way to the X server.
+ * The application should not do this because it
+ * would not be platform independent then.
+ */
+ XFlush(fgDisplay.Display);
+
+ return;
+ }