From 2e8c21ad2d2de1d42db7a02e67adb71a57df7b98 Mon Sep 17 00:00:00 2001 From: Liam Date: Tue, 30 Jan 2024 00:44:26 -0500 Subject: [PATCH] core: fix multiprocess with nce --- src/core/hle/kernel/k_process.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/core/hle/kernel/k_process.cpp b/src/core/hle/kernel/k_process.cpp index 0b08e877ef..1bcc428907 100644 --- a/src/core/hle/kernel/k_process.cpp +++ b/src/core/hle/kernel/k_process.cpp @@ -4,8 +4,9 @@ #include #include "common/scope_exit.h" #include "common/settings.h" +#include "core/arm/dynarmic/arm_dynarmic.h" +#include "core/arm/dynarmic/dynarmic_exclusive_monitor.h" #include "core/core.h" -#include "core/gpu_dirty_memory_manager.h" #include "core/hle/kernel/k_process.h" #include "core/hle/kernel/k_scoped_resource_reservation.h" #include "core/hle/kernel/k_shared_memory.h" @@ -1258,6 +1259,10 @@ void KProcess::InitializeInterfaces() { #ifdef HAS_NCE if (this->IsApplication() && Settings::IsNceEnabled()) { + // Register the scoped JIT handler before creating any NCE instances + // so that its signal handler will appear first in the signal chain. + Core::ScopedJitExecution::RegisterHandler(); + for (size_t i = 0; i < Core::Hardware::NUM_CPU_CORES; i++) { m_arm_interfaces[i] = std::make_unique(m_kernel.System(), true, i); }