src/SDL.c
changeset 5221 2ee8112bfc6b
parent 5189 6f6a9340fb93
child 5257 956d42855c92
equal deleted inserted replaced
5220:1fbe1c202501 5221:2ee8112bfc6b
   213 
   213 
   214 void
   214 void
   215 SDL_Quit(void)
   215 SDL_Quit(void)
   216 {
   216 {
   217     /* Quit all subsystems */
   217     /* Quit all subsystems */
   218 #ifdef DEBUG_BUILD
       
   219     printf("[SDL_Quit] : Enter! Calling QuitSubSystem()\n");
       
   220     fflush(stdout);
       
   221 #endif
       
   222 
       
   223 #if defined(__WIN32__)
   218 #if defined(__WIN32__)
   224     SDL_HelperWindowDestroy();
   219     SDL_HelperWindowDestroy();
   225 #endif
   220 #endif
   226     SDL_QuitSubSystem(SDL_INIT_EVERYTHING);
   221     SDL_QuitSubSystem(SDL_INIT_EVERYTHING);
   227 
   222 
   228 #ifdef CHECK_LEAKS
   223 #ifdef CHECK_LEAKS
   229 #ifdef DEBUG_BUILD
       
   230     printf("[SDL_Quit] : CHECK_LEAKS\n");
       
   231     fflush(stdout);
       
   232 #endif
       
   233 
       
   234     /* !!! FIXME: make this an assertion. */
   224     /* !!! FIXME: make this an assertion. */
   235     /* Print the number of surfaces not freed */
   225     /* Print the number of surfaces not freed */
   236     if (surfaces_allocated != 0) {
   226     if (surfaces_allocated != 0) {
   237         fprintf(stderr, "SDL Warning: %d SDL surfaces extant\n",
   227         fprintf(stderr, "SDL Warning: %d SDL surfaces extant\n",
   238                 surfaces_allocated);
   228                 surfaces_allocated);
   239     }
   229     }
   240 #endif
   230 #endif
   241 #ifdef DEBUG_BUILD
       
   242     printf("[SDL_Quit] : SDL_UninstallParachute()\n");
       
   243     fflush(stdout);
       
   244 #endif
       
   245 
   231 
   246     /* Uninstall any parachute signal handlers */
   232     /* Uninstall any parachute signal handlers */
   247     SDL_UninstallParachute();
   233     SDL_UninstallParachute();
   248 
   234 
   249     SDL_ClearHints();
   235     SDL_ClearHints();
   250     SDL_AssertionsQuit();
   236     SDL_AssertionsQuit();
   251 
   237     SDL_LogResetPriorities();
   252 #ifdef DEBUG_BUILD
       
   253     printf("[SDL_Quit] : Returning!\n");
       
   254     fflush(stdout);
       
   255 #endif
       
   256 
       
   257 }
   238 }
   258 
   239 
   259 /* Get the library version number */
   240 /* Get the library version number */
   260 void
   241 void
   261 SDL_GetVersion(SDL_version * ver)
   242 SDL_GetVersion(SDL_version * ver)