src/video/SDL_video.c
branchSDL-1.3
changeset 1707 57ce47f033a5
parent 1706 1577404809f0
child 1712 931d111e737a
equal deleted inserted replaced
1706:1577404809f0 1707:57ce47f033a5
   532     if (!_this) {
   532     if (!_this) {
   533         SDL_SetError("Video subsystem has not been initialized");
   533         SDL_SetError("Video subsystem has not been initialized");
   534         return -1;
   534         return -1;
   535     }
   535     }
   536 
   536 
   537     /* Make sure there's an actual display mode to set */
       
   538     if (!mode) {
   537     if (!mode) {
   539         SDL_SetError("No mode passed to SDL_SetDisplayMode");
   538         mode = SDL_GetDesktopDisplayMode();
   540         return -1;
       
   541     }
   539     }
   542     display = &SDL_CurrentDisplay;
   540     display = &SDL_CurrentDisplay;
   543     display_mode = *mode;
   541     display_mode = *mode;
   544 
   542 
   545     /* Default to the current mode */
   543     /* Default to the current mode */