From 633411c20f9759a9a5f1a3bf15466b387dce9a5a Mon Sep 17 00:00:00 2001
From: Liam <byteslice@airmail.cc>
Date: Sun, 30 Oct 2022 20:02:33 -0400
Subject: [PATCH] kernel: fix single core for service threads

---
 src/core/hle/kernel/kernel.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/core/hle/kernel/kernel.cpp b/src/core/hle/kernel/kernel.cpp
index 054898638e..09c36ee09d 100644
--- a/src/core/hle/kernel/kernel.cpp
+++ b/src/core/hle/kernel/kernel.cpp
@@ -336,6 +336,8 @@ struct KernelCore::Impl {
         return this_id;
     }
 
+    static inline thread_local bool is_phantom_mode_for_singlecore{false};
+
     bool IsPhantomModeForSingleCore() const {
         return is_phantom_mode_for_singlecore;
     }
@@ -800,7 +802,6 @@ struct KernelCore::Impl {
 
     bool is_multicore{};
     std::atomic_bool is_shutting_down{};
-    bool is_phantom_mode_for_singlecore{};
     u32 single_core_thread_id{};
 
     std::array<u64, Core::Hardware::NUM_CPU_CORES> svc_ticks{};