uxn

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

commit eb8c496feb4a5eb4c2ba92c4f7edd54c4b522d21
parent 17fd40af436315939d803ecbf98f4671889363aa
Author: Andrew Alderwick <andrew@alderwick.co.uk>
Date:   Fri,  3 Jun 2022 22:41:25 +0100

Revert "Fix for hanging on quit", replacing it with improved code

Diffstat:
Msrc/uxnemu.c | 7++++++-
1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/uxnemu.c b/src/uxnemu.c @@ -511,7 +511,12 @@ main(int argc, char **argv) if(!loaded && !start(&u, "launcher.rom")) return error("usage", "uxnemu [-s scale] file.rom"); 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(); return 0; }