Browse code

Fix for hanging on quit

Devine Lu Linvega authored on 31/05/2022 19:25:25
Showing 1 changed files
... ...
@@ -511,12 +511,7 @@ main(int argc, char **argv)
511 511
 	if(!loaded && !start(&u, "launcher.rom"))
512 512
 		return error("usage", "uxnemu [-s scale] file.rom");
513 513
 	run(&u);
514
-#ifdef _WIN32
515
-#pragma GCC diagnostic ignored "-Wint-to-pointer-cast"
516
-	TerminateThread((HANDLE)SDL_GetThreadID(stdin_thread), 0);
517
-#else
518
-	close(0); /* make stdin thread exit */
519
-#endif
514
+	SDL_WaitThread(stdin_thread, NULL);
520 515
 	SDL_Quit();
521 516
 	return 0;
522 517
 }