emu: use SDL_Quit directly and let SDL handle shutdown itself

This commit is contained in:
Sigrid Solveig Haflínudóttir 2021-12-25 21:44:19 +01:00
parent 2f7bfd4122
commit 8d4e7d54e1
1 changed files with 1 additions and 14 deletions

View File

@ -155,19 +155,6 @@ redraw(Uxn *u)
SDL_RenderPresent(gRenderer);
}
static void
quit(void)
{
if(audio_id)
SDL_CloseAudioDevice(audio_id);
SDL_DestroyTexture(gTexture);
gTexture = NULL;
SDL_DestroyRenderer(gRenderer);
gRenderer = NULL;
SDL_DestroyWindow(gWindow);
SDL_Quit();
}
static int
init(void)
{
@ -583,6 +570,6 @@ main(int argc, char **argv)
if(!loaded && !start(&u, "boot.rom"))
return error("usage", "uxnemu [-s scale] file.rom");
run(&u);
quit();
SDL_Quit();
return 0;
}