diff --git a/src/twn_loop.c b/src/twn_loop.c index 6c4378e..d159065 100644 --- a/src/twn_loop.c +++ b/src/twn_loop.c @@ -731,6 +731,9 @@ static void clean_up(void) { SDL_free(ctx.title); SDL_GL_DeleteContext(ctx.gl_context); SDL_GL_UnloadLibrary(); + SDL_QuitSubSystem(SDL_INIT_EVENTS); + if (ctx.audio_initialized) + SDL_QuitSubSystem(SDL_INIT_AUDIO); SDL_Quit(); }