uxn

Varvara Ordinator, written in ANSI C(SDL2)
git clone https://git.eamoncaddigan.net/uxn.git
Log | Files | Refs | README | LICENSE

commit 8d4e7d54e199f5858d8f81ef2407b37d827ea945
parent 2f7bfd412218a52c42de1ba7182803b694df6ba4
Author: Sigrid Solveig Haflínudóttir <ftrvxmtrx@gmail.com>
Date:   Sat, 25 Dec 2021 21:44:19 +0100

emu: use SDL_Quit directly and let SDL handle shutdown itself

Diffstat:
Msrc/uxnemu.c | 15+--------------
1 file changed, 1 insertion(+), 14 deletions(-)

diff --git 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; }