From 8d4e7d54e199f5858d8f81ef2407b37d827ea945 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sigrid=20Solveig=20Hafl=C3=ADnud=C3=B3ttir?= Date: Sat, 25 Dec 2021 21:44:19 +0100 Subject: [PATCH] emu: use SDL_Quit directly and let SDL handle shutdown itself --- src/uxnemu.c | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/src/uxnemu.c b/src/uxnemu.c index 2fc88e0..ff1faf4 100644 --- a/src/uxnemu.c +++ b/src/uxnemu.c @@ -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; }