From 7d6653268f68dea8bc39288e3a27bc499b7b8154 Mon Sep 17 00:00:00 2001 From: bunnei Date: Tue, 13 Mar 2018 17:49:59 -0400 Subject: core: Move process creation out of global state. --- src/core/core.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/core/core.h') diff --git a/src/core/core.h b/src/core/core.h index ada23b347..635109b21 100644 --- a/src/core/core.h +++ b/src/core/core.h @@ -7,6 +7,7 @@ #include #include #include "common/common_types.h" +#include "core/hle/kernel/kernel.h" #include "core/hle/kernel/scheduler.h" #include "core/loader/loader.h" #include "core/memory.h" @@ -112,6 +113,10 @@ public: return *scheduler; } + Kernel::SharedPtr& CurrentProcess() { + return current_process; + } + PerfStats perf_stats; FrameLimiter frame_limiter; @@ -149,6 +154,8 @@ private: std::unique_ptr scheduler; std::unique_ptr gpu_core; + Kernel::SharedPtr current_process; + /// When true, signals that a reschedule should happen bool reschedule_pending{}; @@ -169,4 +176,8 @@ inline TelemetrySession& Telemetry() { return System::GetInstance().TelemetrySession(); } +inline Kernel::SharedPtr& CurrentProcess() { + return System::GetInstance().CurrentProcess(); +} + } // namespace Core -- cgit v1.2.3