diff options
author | Fernando Sahmkow <fsahmkow27@gmail.com> | 2020-03-19 18:09:32 +0100 |
---|---|---|
committer | Fernando Sahmkow <fsahmkow27@gmail.com> | 2020-06-27 17:35:52 +0200 |
commit | f2ade343e2492c213ac93680a55e9bed712dac9a (patch) | |
tree | 30bce0eb24a0b2b38310f07fa37c7ba881fc8535 /src/core/hle | |
parent | GUI: Make multicore only work with Async and add GUI for multicore. (diff) | |
download | yuzu-f2ade343e2492c213ac93680a55e9bed712dac9a.tar yuzu-f2ade343e2492c213ac93680a55e9bed712dac9a.tar.gz yuzu-f2ade343e2492c213ac93680a55e9bed712dac9a.tar.bz2 yuzu-f2ade343e2492c213ac93680a55e9bed712dac9a.tar.lz yuzu-f2ade343e2492c213ac93680a55e9bed712dac9a.tar.xz yuzu-f2ade343e2492c213ac93680a55e9bed712dac9a.tar.zst yuzu-f2ade343e2492c213ac93680a55e9bed712dac9a.zip |
Diffstat (limited to 'src/core/hle')
-rw-r--r-- | src/core/hle/kernel/kernel.cpp | 2 | ||||
-rw-r--r-- | src/core/hle/kernel/thread.h | 9 |
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 { } const Kernel::Scheduler& sched = cores[result.host_handle].Scheduler(); const Kernel::Thread* current = sched.GetCurrentThread(); - if (current != nullptr) { + if (current != nullptr && !current->IsPhantomMode()) { result.guest_handle = current->GetGlobalHandle(); } else { 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: is_continuous_on_svc = is_continuous; } + bool IsPhantomMode() const { + return is_phantom_mode; + } + + void SetPhantomMode(bool phantom) { + is_phantom_mode = phantom; + } + private: friend class GlobalScheduler; friend class Scheduler; @@ -699,6 +707,7 @@ private: bool is_continuous_on_svc = false; bool will_be_terminated = false; + bool is_phantom_mode = false; bool was_running = false; |