src/SDL12_compat.c
changeset 42 824a66807850
parent 41 f9d92daf587f
child 43 609d8866235c
     1.1 --- a/src/SDL12_compat.c	Sat Jul 26 00:55:32 2014 -0400
     1.2 +++ b/src/SDL12_compat.c	Sat Jul 26 00:56:00 2014 -0400
     1.3 @@ -738,21 +738,16 @@
     1.4      // !!! FIXME: do something about SDL12_INIT_EVENTTHREAD
     1.5      SDL20_QuitSubSystem(sdl20flags);
     1.6  
     1.7 -    // !!! FIXME: UnloadSDL20() ?
     1.8 +    if ((SDL20_WasInit(0) == 0) && (!CDRomInit)) {
     1.9 +        SDL20_Quit();
    1.10 +        UnloadSDL20();
    1.11 +    }
    1.12  }
    1.13  
    1.14  DECLSPEC void SDLCALL
    1.15  SDL_Quit(void)
    1.16  {
    1.17 -    // !!! FIXME: reset a bunch of other global variables too.
    1.18 -    EventFilter12 = NULL;
    1.19 -    EventQueueAvailable = EventQueueHead = EventQueueTail = NULL;
    1.20 -    CurrentCursor = NULL;
    1.21 -    SDL20_FreeFormat(VideoInfo.vfmt);
    1.22 -    SDL20_zero(VideoInfo);
    1.23 -    CDRomInit = 0;
    1.24 -    SDL20_Quit();
    1.25 -    UnloadSDL20();
    1.26 +    SDL_QuitSubSystem(SDL_WasInit(0) | SDL12_INIT_CDROM);
    1.27  }
    1.28  
    1.29  DECLSPEC void SDLCALL