comparison src/video/SDL_video.c @ 1707:57ce47f033a5 SDL-1.3

Passing NULL to SDL_SetDisplayMode() will set the desktop mode.
author Sam Lantinga <slouken@libsdl.org>
date Sat, 24 Jun 2006 17:01:29 +0000
parents 1577404809f0
children 931d111e737a
comparison
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 */