Mercurial > sdl-ios-xcode
comparison 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 |
comparison
equal
deleted
inserted
replaced
1732:fd65f12b6de6 | 1733:0b1070f2f94d |
---|---|
160 | 160 |
161 if (window_flags & SDL_WINDOW_FULLSCREEN) { | 161 if (window_flags & SDL_WINDOW_FULLSCREEN) { |
162 SDL_zero(fullscreen_mode); | 162 SDL_zero(fullscreen_mode); |
163 fullscreen_mode.w = window_w; | 163 fullscreen_mode.w = window_w; |
164 fullscreen_mode.h = window_h; | 164 fullscreen_mode.h = window_h; |
165 mode = &fullscreen_mode; | 165 SDL_SetFullscreenDisplayMode(&fullscreen_mode); |
166 } else { | |
167 /* Set the desktop mode, we don't care what it is */ | |
168 mode = NULL; | |
169 } | |
170 if (SDL_SetDisplayMode(mode) < 0) { | |
171 fprintf(stderr, "Couldn't set display mode: %s\n", SDL_GetError()); | |
172 quit(2); | |
173 } | 166 } |
174 | 167 |
175 /* Create the windows, initialize the renderers, and load the textures */ | 168 /* Create the windows, initialize the renderers, and load the textures */ |
176 windows = (SDL_WindowID *) SDL_malloc(num_windows * sizeof(*windows)); | 169 windows = (SDL_WindowID *) SDL_malloc(num_windows * sizeof(*windows)); |
177 sprites = (SDL_TextureID *) SDL_malloc(num_windows * sizeof(*sprites)); | 170 sprites = (SDL_TextureID *) SDL_malloc(num_windows * sizeof(*sprites)); |