summaryrefslogtreecommitdiff
path: root/src/core/hle
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/hle')
-rw-r--r--src/core/hle/kernel/kernel.cpp2
-rw-r--r--src/core/hle/kernel/thread.h9
2 files changed, 10 insertions, 1 deletions
diff --git a/src/core/hle/kernel/kernel.cpp b/src/core/hle/kernel/kernel.cpp
index d2f5f9bf2..a19cd7a1f 100644
--- a/src/core/hle/kernel/kernel.cpp
+++ b/src/core/hle/kernel/kernel.cpp
@@ -303,7 +303,7 @@ struct KernelCore::Impl {
303 } 303 }
304 const Kernel::Scheduler& sched = cores[result.host_handle].Scheduler(); 304 const Kernel::Scheduler& sched = cores[result.host_handle].Scheduler();
305 const Kernel::Thread* current = sched.GetCurrentThread(); 305 const Kernel::Thread* current = sched.GetCurrentThread();
306 if (current != nullptr) { 306 if (current != nullptr && !current->IsPhantomMode()) {
307 result.guest_handle = current->GetGlobalHandle(); 307 result.guest_handle = current->GetGlobalHandle();
308 } else { 308 } else {
309 result.guest_handle = InvalidHandle; 309 result.guest_handle = InvalidHandle;
diff --git a/src/core/hle/kernel/thread.h b/src/core/hle/kernel/thread.h
index f42d7bd13..f998890c4 100644
--- a/src/core/hle/kernel/thread.h
+++ b/src/core/hle/kernel/thread.h
@@ -597,6 +597,14 @@ public:
597 is_continuous_on_svc = is_continuous; 597 is_continuous_on_svc = is_continuous;
598 } 598 }
599 599
600 bool IsPhantomMode() const {
601 return is_phantom_mode;
602 }
603
604 void SetPhantomMode(bool phantom) {
605 is_phantom_mode = phantom;
606 }
607
600private: 608private:
601 friend class GlobalScheduler; 609 friend class GlobalScheduler;
602 friend class Scheduler; 610 friend class Scheduler;
@@ -699,6 +707,7 @@ private:
699 bool is_continuous_on_svc = false; 707 bool is_continuous_on_svc = false;
700 708
701 bool will_be_terminated = false; 709 bool will_be_terminated = false;
710 bool is_phantom_mode = false;
702 711
703 bool was_running = false; 712 bool was_running = false;
704 713