src/video/x11/SDL_x11modes.c
changeset 6475 71d39944810b
parent 6472 d4623b7209db
child 6482 94e3643928ed
--- a/src/video/x11/SDL_x11modes.c	Thu Sep 27 13:22:34 2012 -0700
+++ b/src/video/x11/SDL_x11modes.c	Thu Sep 27 13:23:34 2012 -0700
@@ -151,9 +151,8 @@
      */
     if (CheckXinerama(data->display, &xinerama_major, &xinerama_minor)) {
         xinerama = XineramaQueryScreens(data->display, &screencount);
-        if (!xinerama) screencount = ScreenCount(data->display);
     }
-    else {
+    if (!xinerama) {
         screencount = ScreenCount(data->display);
     }
 #else
@@ -807,14 +806,11 @@
         return 0;
     }
 #endif
-    if (_this->windows) {
-        rect->x = 0;
-        rect->y = 0;
-        rect->w = _this->windows->w;
-        rect->h = _this->windows->h;
-        return 0;
-    }
-    return -1;
+    rect->x = 0;
+    rect->y = 0;
+    rect->w = sdl_display->current_mode.w;
+    rect->h = sdl_display->current_mode.h;
+    return 0;
 }
 
 #endif /* SDL_VIDEO_DRIVER_X11 */