src/video/x11/SDL_x11modes.c
changeset 6475 71d39944810b
parent 6472 d4623b7209db
child 6482 94e3643928ed
equal deleted inserted replaced
6474:39087ac884d7 6475:71d39944810b
   149      * NOTE: This works with Nvidia Twinview correctly, but you need version 302.17 (released on June 2012)
   149      * NOTE: This works with Nvidia Twinview correctly, but you need version 302.17 (released on June 2012)
   150      *       or newer of the Nvidia binary drivers
   150      *       or newer of the Nvidia binary drivers
   151      */
   151      */
   152     if (CheckXinerama(data->display, &xinerama_major, &xinerama_minor)) {
   152     if (CheckXinerama(data->display, &xinerama_major, &xinerama_minor)) {
   153         xinerama = XineramaQueryScreens(data->display, &screencount);
   153         xinerama = XineramaQueryScreens(data->display, &screencount);
   154         if (!xinerama) screencount = ScreenCount(data->display);
   154     }
   155     }
   155     if (!xinerama) {
   156     else {
       
   157         screencount = ScreenCount(data->display);
   156         screencount = ScreenCount(data->display);
   158     }
   157     }
   159 #else
   158 #else
   160     screencount = ScreenCount(data->display);
   159     screencount = ScreenCount(data->display);
   161 #endif
   160 #endif
   805         rect->w = data->xinerama_info.width;
   804         rect->w = data->xinerama_info.width;
   806         rect->h = data->xinerama_info.height;
   805         rect->h = data->xinerama_info.height;
   807         return 0;
   806         return 0;
   808     }
   807     }
   809 #endif
   808 #endif
   810     if (_this->windows) {
   809     rect->x = 0;
   811         rect->x = 0;
   810     rect->y = 0;
   812         rect->y = 0;
   811     rect->w = sdl_display->current_mode.w;
   813         rect->w = _this->windows->w;
   812     rect->h = sdl_display->current_mode.h;
   814         rect->h = _this->windows->h;
   813     return 0;
   815         return 0;
       
   816     }
       
   817     return -1;
       
   818 }
   814 }
   819 
   815 
   820 #endif /* SDL_VIDEO_DRIVER_X11 */
   816 #endif /* SDL_VIDEO_DRIVER_X11 */
   821 
   817 
   822 /* vi: set ts=4 sw=4 expandtab: */
   818 /* vi: set ts=4 sw=4 expandtab: */