Mercurial > sdl-ios-xcode
comparison src/video/wincommon/SDL_sysevents.c @ 1497:420b3f47806d
Fixes from Dmitry Yakimov:
fixed bugs 159 and 160:
+ added threaded timers support
! fixed restoring sdl window focus (AV in windows message handler)
! disabled forgotten cdrom and joystick in config file.
* disabled minimizing sdl window while loosing focus.
PocketPC does not have a task bar, so it is an inconvenient and unusual
behaviour for PPC users.
+ added WIN_Paint handler for GAPI
! fixed loosing focus while using GAPI videi driver
+ added TestTimer project
* removed unnecessary macros (ENABLE_WINDIB ...) from projects
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Sat, 11 Mar 2006 23:46:45 +0000 |
parents | 0a2bd6507477 |
children | 3968f7cba10c |
comparison
equal
deleted
inserted
replaced
1496:405e20dc004c | 1497:420b3f47806d |
---|---|
104 | 104 |
105 static void LoadAygshell(void) | 105 static void LoadAygshell(void) |
106 { | 106 { |
107 if( !aygshell ) | 107 if( !aygshell ) |
108 aygshell = SDL_LoadObject("aygshell.dll"); | 108 aygshell = SDL_LoadObject("aygshell.dll"); |
109 if( aygshell ) | 109 if( (aygshell != 0) && (SHFullScreen == 0) ) |
110 { | 110 { |
111 SHFullScreen = (int (WINAPI *)(struct HWND__ *,unsigned long)) SDL_LoadFunction(aygshell, "SHFullScreen"); | 111 SHFullScreen = (int (WINAPI *)(struct HWND__ *,unsigned long)) SDL_LoadFunction(aygshell, "SHFullScreen"); |
112 } | 112 } |
113 } | 113 } |
114 | 114 |
169 | 169 |
170 #endif | 170 #endif |
171 | 171 |
172 static void SDL_RestoreGameMode(void) | 172 static void SDL_RestoreGameMode(void) |
173 { | 173 { |
174 #ifdef _WIN32_WCE | |
175 SDL_VideoDevice *this = current_video; | |
176 if(SDL_strcmp(this->name, "gapi") == 0) | |
177 { | |
178 if( this->hidden->suspended ) | |
179 { | |
180 this->hidden->suspended = 0; | |
181 } | |
182 } | |
183 #else | |
174 ShowWindow(SDL_Window, SW_RESTORE); | 184 ShowWindow(SDL_Window, SW_RESTORE); |
185 #endif | |
186 | |
175 #ifndef NO_CHANGEDISPLAYSETTINGS | 187 #ifndef NO_CHANGEDISPLAYSETTINGS |
176 #ifndef _WIN32_WCE | 188 #ifndef _WIN32_WCE |
177 ChangeDisplaySettings(&SDL_fullscreen_mode, CDS_FULLSCREEN); | 189 ChangeDisplaySettings(&SDL_fullscreen_mode, CDS_FULLSCREEN); |
178 #endif | 190 #endif |
179 #endif /* NO_CHANGEDISPLAYSETTINGS */ | 191 #endif /* NO_CHANGEDISPLAYSETTINGS */ |
180 } | 192 } |
181 static void SDL_RestoreDesktopMode(void) | 193 static void SDL_RestoreDesktopMode(void) |
182 { | 194 { |
195 | |
196 #ifdef _WIN32_WCE | |
197 SDL_VideoDevice *this = current_video; | |
198 if(SDL_strcmp(this->name, "gapi") == 0) | |
199 { | |
200 if( !this->hidden->suspended ) | |
201 { | |
202 this->hidden->suspended = 1; | |
203 } | |
204 } | |
205 #else | |
206 /* WinCE does not have a taskbar, so minimizing is not convenient */ | |
183 ShowWindow(SDL_Window, SW_MINIMIZE); | 207 ShowWindow(SDL_Window, SW_MINIMIZE); |
208 #endif | |
209 | |
184 #ifndef NO_CHANGEDISPLAYSETTINGS | 210 #ifndef NO_CHANGEDISPLAYSETTINGS |
185 #ifndef _WIN32_WCE | 211 #ifndef _WIN32_WCE |
186 ChangeDisplaySettings(NULL, 0); | 212 ChangeDisplaySettings(NULL, 0); |
187 #endif | 213 #endif |
188 #endif /* NO_CHANGEDISPLAYSETTINGS */ | 214 #endif /* NO_CHANGEDISPLAYSETTINGS */ |
316 } | 342 } |
317 #if defined(_WIN32_WCE) | 343 #if defined(_WIN32_WCE) |
318 if ( WINDIB_FULLSCREEN() ) | 344 if ( WINDIB_FULLSCREEN() ) |
319 { | 345 { |
320 LoadAygshell(); | 346 LoadAygshell(); |
321 if( aygshell ) | 347 if( SHFullScreen ) |
322 SHFullScreen(SDL_Window, SHFS_HIDESTARTICON|SHFS_HIDETASKBAR|SHFS_HIDESIPBUTTON); | 348 SHFullScreen(SDL_Window, SHFS_HIDESTARTICON|SHFS_HIDETASKBAR|SHFS_HIDESIPBUTTON); |
323 else | 349 else |
324 ShowWindow(FindWindow(TEXT("HHTaskBar"),NULL),SW_HIDE); | 350 ShowWindow(FindWindow(TEXT("HHTaskBar"),NULL),SW_HIDE); |
325 | 351 |
326 } | 352 } |
343 } | 369 } |
344 if ( WINDIB_FULLSCREEN() ) { | 370 if ( WINDIB_FULLSCREEN() ) { |
345 SDL_RestoreDesktopMode(); | 371 SDL_RestoreDesktopMode(); |
346 #if defined(_WIN32_WCE) | 372 #if defined(_WIN32_WCE) |
347 LoadAygshell(); | 373 LoadAygshell(); |
348 if( aygshell ) | 374 if( SHFullScreen ) |
349 SHFullScreen(SDL_Window, SHFS_SHOWSTARTICON|SHFS_SHOWTASKBAR|SHFS_SHOWSIPBUTTON); | 375 SHFullScreen(SDL_Window, SHFS_SHOWSTARTICON|SHFS_SHOWTASKBAR|SHFS_SHOWSIPBUTTON); |
350 else | 376 else |
351 ShowWindow(FindWindow(TEXT("HHTaskBar"),NULL),SW_SHOW); | 377 ShowWindow(FindWindow(TEXT("HHTaskBar"),NULL),SW_SHOW); |
352 | 378 |
353 #endif | 379 #endif |