Mercurial > sdl-ios-xcode
diff src/SDL.c @ 2580:64fa227c01ce gsoc2008_force_feedback
Added the concept of the HelperWindow to help with DirectInput.
author | Edgar Simo <bobbens@gmail.com> |
---|---|
date | Mon, 04 Aug 2008 11:22:01 +0000 |
parents | 3f73c88c9abb |
children |
line wrap: on
line diff
--- a/src/SDL.c Sun Aug 03 10:25:25 2008 +0000 +++ b/src/SDL.c Mon Aug 04 11:22:01 2008 +0000 @@ -51,6 +51,10 @@ extern int SDL_TimerInit(void); extern void SDL_TimerQuit(void); #endif +#if defined(__WIN32__) +extern int SDL_HelperWindowCreate(void); +extern int SDL_HelperWindowDestroy(void); +#endif /* The initialized subsystems */ static Uint32 SDL_initialized = 0; @@ -172,6 +176,12 @@ /* Clear the error message */ SDL_ClearError(); +#if defined(__WIN32__) + if (SDL_HelperWindowCreate() < 0) { + return -1; + } +#endif + /* Initialize the desired subsystems */ if (SDL_InitSubSystem(flags) < 0) { return (-1); @@ -243,6 +253,10 @@ printf("[SDL_Quit] : Enter! Calling QuitSubSystem()\n"); fflush(stdout); #endif + +#if defined(__WIN32__) + SDL_HelperWindowDestroy(); +#endif SDL_QuitSubSystem(SDL_INIT_EVERYTHING); #ifdef CHECK_LEAKS