src/video/SDL_video.c
changeset 2869 2fe507a2ef7d
parent 2860 6ce28e5287e9
child 2875 91a7e08cd238
equal deleted inserted replaced
2868:3b595278f813 2869:2fe507a2ef7d
   656     }
   656     }
   657     display = &SDL_CurrentDisplay;
   657     display = &SDL_CurrentDisplay;
   658     if (!mode) {
   658     if (!mode) {
   659         mode = &display->desktop_mode;
   659         mode = &display->desktop_mode;
   660     }
   660     }
   661     SDL_GetClosestDisplayMode(mode, &fullscreen_mode);
   661     if (!SDL_GetClosestDisplayMode(mode, &fullscreen_mode)) {
       
   662         SDL_SetError("Couldn't find display mode match");
       
   663         return -1;
       
   664     }
   662     if (SDL_memcmp
   665     if (SDL_memcmp
   663         (&fullscreen_mode, &display->fullscreen_mode,
   666         (&fullscreen_mode, &display->fullscreen_mode,
   664          sizeof(fullscreen_mode)) == 0) {
   667          sizeof(fullscreen_mode)) == 0) {
   665         /* Nothing to do... */
   668         /* Nothing to do... */
   666         return 0;
   669         return 0;