emu: use SDL_Quit directly and let SDL handle shutdown itself
This commit is contained in:
parent
2f7bfd4122
commit
8d4e7d54e1
15
src/uxnemu.c
15
src/uxnemu.c
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue