From 6de80dffe261b368ecefee36c9b2b337335228c0 Mon Sep 17 00:00:00 2001 From: Michael Oliver Date: Wed, 29 Apr 2026 11:20:42 +0100 Subject: [PATCH] [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. --- src/xenia/emulator.cc | 5 +++++ src/xenia/kernel/kernel_state.cc | 5 ----- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/xenia/emulator.cc b/src/xenia/emulator.cc index ae64b8c9f..4da09db80 100644 --- a/src/xenia/emulator.cc +++ b/src/xenia/emulator.cc @@ -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; } diff --git a/src/xenia/kernel/kernel_state.cc b/src/xenia/kernel/kernel_state.cc index dce43d151..412610575 100644 --- a/src/xenia/kernel/kernel_state.cc +++ b/src/xenia/kernel/kernel_state.cc @@ -426,11 +426,6 @@ object_ref KernelState::LaunchModule(object_ref 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; }