mirror of
https://git.sr.ht/~rabbits/uxn
synced 2024-11-24 06:45:11 +00:00
emu: use SDL_Quit directly and let SDL handle shutdown itself
This commit is contained in:
parent
2f7bfd4122
commit
8d4e7d54e1
1 changed files with 1 additions and 14 deletions
15
src/uxnemu.c
15
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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue