mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-06-14 05:34:38 -04:00
Cleanly shut down JKRDecomp thread
Properly join the thread to ensure it's shut down before we try to exit. Fixes #268
This commit is contained in:
@@ -1010,3 +1010,9 @@ int mDoMch_Create() {
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
#if TARGET_PC
|
||||
void mDoMch_Destroy() {
|
||||
JFWSystem::shutdown();
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -366,6 +366,8 @@ int game_main(int argc, char* argv[]) {
|
||||
fflush(stdout);
|
||||
fflush(stderr);
|
||||
|
||||
mDoMch_Destroy();
|
||||
|
||||
// Notifies all CVs and causes threads to exit
|
||||
OSResetSystem(OS_RESET_SHUTDOWN, 0, 0);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user