src/video/x11/SDL_x11modes.c
changeset 8922 dfb6f8611ebe
parent 8149 681eb46b8ac4
child 9167 3d2c0f659ad3
     1.1 --- a/src/video/x11/SDL_x11modes.c	Wed Jun 25 00:20:21 2014 -0700
     1.2 +++ b/src/video/x11/SDL_x11modes.c	Wed Jun 25 00:43:10 2014 -0700
     1.3 @@ -674,7 +674,6 @@
     1.4      int screen_w;
     1.5      int screen_h;
     1.6      SDL_DisplayMode mode;
     1.7 -    SDL_DisplayModeData *modedata;
     1.8  
     1.9      /* Unfortunately X11 requires the window to be created with the correct
    1.10       * visual and depth ahead of time, but the SDL API allows you to create
    1.11 @@ -692,6 +691,7 @@
    1.12      if (data->use_xinerama) {
    1.13          if (data->use_vidmode && !data->xinerama_info.x_org && !data->xinerama_info.y_org &&
    1.14             (screen_w > data->xinerama_info.width || screen_h > data->xinerama_info.height)) {
    1.15 +            SDL_DisplayModeData *modedata;
    1.16              /* Add the full (both screens combined) xinerama mode only on the display that starts at 0,0
    1.17               * if we're using vidmode.
    1.18               */
    1.19 @@ -707,6 +707,7 @@
    1.20          }
    1.21          else if (!data->use_xrandr)
    1.22          {
    1.23 +            SDL_DisplayModeData *modedata;
    1.24              /* Add the current mode of each monitor otherwise if we can't get them from xrandr */
    1.25              mode.w = data->xinerama_info.width;
    1.26              mode.h = data->xinerama_info.height;
    1.27 @@ -759,6 +760,7 @@
    1.28      if (data->use_vidmode &&
    1.29          X11_XF86VidModeGetAllModeLines(display, data->vidmode_screen, &nmodes, &modes)) {
    1.30          int i;
    1.31 +        SDL_DisplayModeData *modedata;
    1.32  
    1.33  #ifdef X11MODES_DEBUG
    1.34          printf("VidMode modes: (unsorted)\n");
    1.35 @@ -787,6 +789,7 @@
    1.36  #endif /* SDL_VIDEO_DRIVER_X11_XVIDMODE */
    1.37  
    1.38      if (!data->use_xrandr && !data->use_vidmode) {
    1.39 +        SDL_DisplayModeData *modedata;
    1.40          /* Add the desktop mode */
    1.41          mode = sdl_display->desktop_mode;
    1.42          modedata = (SDL_DisplayModeData *) SDL_calloc(1, sizeof(SDL_DisplayModeData));