0
0
Fork 0
mirror of https://git.sr.ht/~rabbits/uxn synced 2024-11-28 00:33:02 +00:00

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

View file

@ -155,19 +155,6 @@ redraw(Uxn *u)
SDL_RenderPresent(gRenderer); 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 static int
init(void) init(void)
{ {
@ -583,6 +570,6 @@ main(int argc, char **argv)
if(!loaded && !start(&u, "boot.rom")) if(!loaded && !start(&u, "boot.rom"))
return error("usage", "uxnemu [-s scale] file.rom"); return error("usage", "uxnemu [-s scale] file.rom");
run(&u); run(&u);
quit(); SDL_Quit();
return 0; return 0;
} }