diff test/testsprite2.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/test/testsprite2.c	Sat Jun 24 16:51:01 2006 +0000
+++ b/test/testsprite2.c	Sat Jun 24 17:01:29 2006 +0000
@@ -155,22 +155,10 @@
         }
     }
 
-    /* Initialize the video mode, if necessary */
-    current_mode = SDL_GetCurrentDisplayMode();
-    if (!current_mode->w || !current_mode->h) {
-        SDL_DisplayMode mode;
-
-        /* Let the driver pick something it likes, we don't care */
-        mode.format = 0;
-        mode.w = 0;
-        mode.h = 0;
-        mode.refresh_rate = 0;
-
-        if (SDL_SetDisplayMode(&mode) < 0) {
-            fprintf(stderr, "Couldn't set display mode: %s\n",
-                    SDL_GetError());
-            quit(2);
-        }
+    /* Set the desktop mode, we don't care what it is */
+    if (SDL_SetDisplayMode(NULL) < 0) {
+        fprintf(stderr, "Couldn't set display mode: %s\n", SDL_GetError());
+        quit(2);
     }
 
     /* Create the windows, initialize the renderers, and load the textures */