diff 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
line wrap: on
line diff
--- a/src/video/SDL_video.c	Sat Jun 24 16:51:01 2006 +0000
+++ b/src/video/SDL_video.c	Sat Jun 24 17:01:29 2006 +0000
@@ -534,10 +534,8 @@
         return -1;
     }
 
-    /* Make sure there's an actual display mode to set */
     if (!mode) {
-        SDL_SetError("No mode passed to SDL_SetDisplayMode");
-        return -1;
+        mode = SDL_GetDesktopDisplayMode();
     }
     display = &SDL_CurrentDisplay;
     display_mode = *mode;