src/video/x11/SDL_x11modes.c
changeset 7431 0fc94f315dac
parent 7361 9b4430c49235
child 7485 6ffa71faa50b
equal deleted inserted replaced
7430:f204394628db 7431:0fc94f315dac
   702                 *modedata = *(SDL_DisplayModeData *)sdl_display->desktop_mode.driverdata;
   702                 *modedata = *(SDL_DisplayModeData *)sdl_display->desktop_mode.driverdata;
   703             }
   703             }
   704             mode.driverdata = modedata;
   704             mode.driverdata = modedata;
   705             SDL_AddDisplayMode(sdl_display, &mode);
   705             SDL_AddDisplayMode(sdl_display, &mode);
   706         }
   706         }
   707         else
   707         else if (!data->use_xrandr)
   708         {
   708         {
   709             /* Add the current mode of each monitor otherwise */
   709             /* Add the current mode of each monitor otherwise if we can't get them from xrandr */
   710             mode.w = data->xinerama_info.width;
   710             mode.w = data->xinerama_info.width;
   711             mode.h = data->xinerama_info.height;
   711             mode.h = data->xinerama_info.height;
   712             mode.refresh_rate = 0;
   712             mode.refresh_rate = 0;
   713             modedata = (SDL_DisplayModeData *) SDL_calloc(1, sizeof(SDL_DisplayModeData));
   713             modedata = (SDL_DisplayModeData *) SDL_calloc(1, sizeof(SDL_DisplayModeData));
   714             if (modedata) {
   714             if (modedata) {