diff test/testsprite2.c @ 1733:0b1070f2f94d SDL-1.3

Implemented gamma correction on Windows. Added general code to restore the video mode and gamma when windows lose focus.
author Sam Lantinga <slouken@libsdl.org>
date Sun, 09 Jul 2006 09:02:26 +0000
parents 98a3207ddde8
children
line wrap: on
line diff
--- a/test/testsprite2.c	Sat Jul 08 20:55:39 2006 +0000
+++ b/test/testsprite2.c	Sun Jul 09 09:02:26 2006 +0000
@@ -162,14 +162,7 @@
         SDL_zero(fullscreen_mode);
         fullscreen_mode.w = window_w;
         fullscreen_mode.h = window_h;
-        mode = &fullscreen_mode;
-    } else {
-        /* Set the desktop mode, we don't care what it is */
-        mode = NULL;
-    }
-    if (SDL_SetDisplayMode(mode) < 0) {
-        fprintf(stderr, "Couldn't set display mode: %s\n", SDL_GetError());
-        quit(2);
+        SDL_SetFullscreenDisplayMode(&fullscreen_mode);
     }
 
     /* Create the windows, initialize the renderers, and load the textures */