Skip to content

Commit

Permalink
Clean up SDL quit code a little.
Browse files Browse the repository at this point in the history
  • Loading branch information
icculus committed Jul 26, 2014
1 parent 8cb0947 commit 09cf3aa
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions src/SDL12_compat.c
Expand Up @@ -738,21 +738,16 @@ SDL_QuitSubSystem(Uint32 sdl12flags)
// !!! FIXME: do something about SDL12_INIT_EVENTTHREAD
SDL20_QuitSubSystem(sdl20flags);

// !!! FIXME: UnloadSDL20() ?
if ((SDL20_WasInit(0) == 0) && (!CDRomInit)) {
SDL20_Quit();
UnloadSDL20();
}
}

DECLSPEC void SDLCALL
SDL_Quit(void)
{
// !!! FIXME: reset a bunch of other global variables too.
EventFilter12 = NULL;
EventQueueAvailable = EventQueueHead = EventQueueTail = NULL;
CurrentCursor = NULL;
SDL20_FreeFormat(VideoInfo.vfmt);
SDL20_zero(VideoInfo);
CDRomInit = 0;
SDL20_Quit();
UnloadSDL20();
SDL_QuitSubSystem(SDL_WasInit(0) | SDL12_INIT_CDROM);
}

DECLSPEC void SDLCALL
Expand Down

0 comments on commit 09cf3aa

Please sign in to comment.