[Emulator] Load title plugins before main thread execution begins

This keeps the title thread suspended until plugins are loaded, allowing early init and hook setup before guest code starts running.
This commit is contained in:
Michael Oliver
2026-04-29 11:20:42 +01:00
committed by Radosław Gliński
parent 6dca89834e
commit 6de80dffe2
2 changed files with 5 additions and 5 deletions

View File

@@ -1707,6 +1707,11 @@ X_STATUS Emulator::CompleteLaunch(const std::filesystem::path& path,
}
}
// Resume the main thread now.
// If the debugger has requested a suspend this will just decrement the
// suspend count without resuming it until the debugger wants.
main_thread_->Resume();
return X_STATUS_SUCCESS;
}

View File

@@ -426,11 +426,6 @@ object_ref<XThread> KernelState::LaunchModule(object_ref<UserModule> module) {
// Waits for a debugger client, if desired.
emulator()->processor()->PreLaunch();
// Resume the thread now.
// If the debugger has requested a suspend this will just decrement the
// suspend count without resuming it until the debugger wants.
thread->Resume();
return thread;
}