summaryrefslogtreecommitdiff
path: root/src/core/core.cpp
diff options
context:
space:
mode:
authorGravatar Morph2021-10-14 14:21:15 -0400
committerGravatar Morph2021-10-15 17:34:48 -0400
commitb6719094e69bba468ecbc275fd892c4d412b92a3 (patch)
tree633d5621300ec64c6ed2a2e7cfdff587d5462c0a /src/core/core.cpp
parentMerge pull request #7183 from FearlessTobi/translation-ci (diff)
downloadyuzu-b6719094e69bba468ecbc275fd892c4d412b92a3.tar.gz
yuzu-b6719094e69bba468ecbc275fd892c4d412b92a3.tar.xz
yuzu-b6719094e69bba468ecbc275fd892c4d412b92a3.zip
core: Remove static system instance
Diffstat (limited to 'src/core/core.cpp')
-rw-r--r--src/core/core.cpp15
1 files changed, 1 insertions, 14 deletions
diff --git a/src/core/core.cpp b/src/core/core.cpp
index bb268a319..ae1d56b27 100644
--- a/src/core/core.cpp
+++ b/src/core/core.cpp
@@ -428,21 +428,8 @@ struct System::Impl {
428}; 428};
429 429
430System::System() : impl{std::make_unique<Impl>(*this)} {} 430System::System() : impl{std::make_unique<Impl>(*this)} {}
431System::~System() = default;
432
433System& System::GetInstance() {
434 if (!s_instance) {
435 throw std::runtime_error("Using System instance before its initialization");
436 }
437 return *s_instance;
438}
439 431
440void System::InitializeGlobalInstance() { 432System::~System() = default;
441 if (s_instance) {
442 throw std::runtime_error("Reinitializing Global System instance.");
443 }
444 s_instance = std::unique_ptr<System>(new System);
445}
446 433
447CpuManager& System::GetCpuManager() { 434CpuManager& System::GetCpuManager() {
448 return impl->cpu_manager; 435 return impl->cpu_manager;