summaryrefslogtreecommitdiff
path: root/Source/Core
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Core')
-rw-r--r--Source/Core/Core/CMakeLists.txt2
-rw-r--r--Source/Core/Core/Core.vcxproj2
-rw-r--r--Source/Core/Core/Core.vcxproj.filters2
-rw-r--r--Source/Core/Core/System.cpp18
-rw-r--r--Source/Core/Core/System.h36
5 files changed, 60 insertions, 0 deletions
diff --git a/Source/Core/Core/CMakeLists.txt b/Source/Core/Core/CMakeLists.txt
index de8fd8ac93..03c87e6db3 100644
--- a/Source/Core/Core/CMakeLists.txt
+++ b/Source/Core/Core/CMakeLists.txt
@@ -41,6 +41,8 @@ add_library(core
SyncIdentifier.h
SysConf.cpp
SysConf.h
+ System.cpp
+ System.h
TitleDatabase.cpp
TitleDatabase.h
WiiRoot.cpp
diff --git a/Source/Core/Core/Core.vcxproj b/Source/Core/Core/Core.vcxproj
index a7ada5b18e..f672f088d1 100644
--- a/Source/Core/Core/Core.vcxproj
+++ b/Source/Core/Core/Core.vcxproj
@@ -371,6 +371,7 @@
<ClCompile Include="PowerPC\SignatureDB\SignatureDB.cpp" />
<ClCompile Include="State.cpp" />
<ClCompile Include="SysConf.cpp" />
+ <ClCompile Include="System.cpp" />
<ClCompile Include="TitleDatabase.cpp" />
<ClCompile Include="WiiRoot.cpp" />
<ClCompile Include="WiiUtils.cpp" />
@@ -678,6 +679,7 @@
<ClInclude Include="State.h" />
<ClInclude Include="SyncIdentifier.h" />
<ClInclude Include="SysConf.h" />
+ <ClInclude Include="System.h" />
<ClInclude Include="Titles.h" />
<ClInclude Include="TitleDatabase.h" />
<ClInclude Include="WiiRoot.h" />
diff --git a/Source/Core/Core/Core.vcxproj.filters b/Source/Core/Core/Core.vcxproj.filters
index 749b81b9c2..ae2205c989 100644
--- a/Source/Core/Core/Core.vcxproj.filters
+++ b/Source/Core/Core/Core.vcxproj.filters
@@ -187,6 +187,7 @@
<ClCompile Include="PatchEngine.cpp" />
<ClCompile Include="State.cpp" />
<ClCompile Include="SysConf.cpp" />
+ <ClCompile Include="System.cpp" />
<ClCompile Include="TitleDatabase.cpp" />
<ClCompile Include="WiiRoot.cpp" />
<ClCompile Include="WiiUtils.cpp" />
@@ -1022,6 +1023,7 @@
<ClInclude Include="PatchEngine.h" />
<ClInclude Include="State.h" />
<ClInclude Include="SysConf.h" />
+ <ClInclude Include="System.h" />
<ClInclude Include="Titles.h" />
<ClInclude Include="TitleDatabase.h" />
<ClInclude Include="WiiRoot.h" />
diff --git a/Source/Core/Core/System.cpp b/Source/Core/Core/System.cpp
new file mode 100644
index 0000000000..7bc1b50c62
--- /dev/null
+++ b/Source/Core/Core/System.cpp
@@ -0,0 +1,18 @@
+// Copyright 2020 Dolphin Emulator Project
+// Licensed under GPLv2+
+// Refer to the license.txt file included.
+
+#include "Core/System.h"
+
+namespace Core
+{
+struct System::Impl
+{
+};
+
+System::System() : m_impl{std::make_unique<Impl>()}
+{
+}
+
+System::~System() = default;
+} // namespace Core
diff --git a/Source/Core/Core/System.h b/Source/Core/Core/System.h
new file mode 100644
index 0000000000..82b2c8af54
--- /dev/null
+++ b/Source/Core/Core/System.h
@@ -0,0 +1,36 @@
+// Copyright 2020 Dolphin Emulator Project
+// Licensed under GPLv2+
+// Refer to the license.txt file included.
+
+#pragma once
+
+#include <memory>
+
+namespace Core
+{
+// Central class that encapsulates the running system.
+class System
+{
+public:
+ ~System();
+
+ System(const System&) = delete;
+ System& operator=(const System&) = delete;
+
+ System(System&&) = delete;
+ System& operator=(System&&) = delete;
+
+ // Intermediate instance accessor until global state is eliminated.
+ static System& GetInstance()
+ {
+ static System instance;
+ return instance;
+ }
+
+private:
+ System();
+
+ struct Impl;
+ std::unique_ptr<Impl> m_impl;
+};
+} // namespace Core