0
0
Fork 0
mirror of https://git.sr.ht/~rabbits/uxn synced 2025-01-07 08:01:17 +00:00

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

This commit is contained in:
Andrew Alderwick 2022-06-03 22:41:25 +01:00
parent 17fd40af43
commit eb8c496feb

View file

@ -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;
}