mirror of https://git.sr.ht/~rabbits/uxn
Revert "Fix for hanging on quit", replacing it with improved code
This commit is contained in:
parent
17fd40af43
commit
eb8c496feb
|
@ -511,7 +511,12 @@ main(int argc, char **argv)
|
||||||
if(!loaded && !start(&u, "launcher.rom"))
|
if(!loaded && !start(&u, "launcher.rom"))
|
||||||
return error("usage", "uxnemu [-s scale] file.rom");
|
return error("usage", "uxnemu [-s scale] file.rom");
|
||||||
run(&u);
|
run(&u);
|
||||||
SDL_WaitThread(stdin_thread, NULL);
|
#ifdef _WIN32
|
||||||
|
#pragma GCC diagnostic ignored "-Wint-to-pointer-cast"
|
||||||
|
TerminateThread((HANDLE)SDL_GetThreadID(stdin_thread), 0);
|
||||||
|
#elif !defined(__APPLE__)
|
||||||
|
close(0); /* make stdin thread exit */
|
||||||
|
#endif
|
||||||
SDL_Quit();
|
SDL_Quit();
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue