aboutsummaryrefslogtreecommitdiff
path: root/src/core/core.cpp
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2019-03-05 12:28:10 -0500
committerLioncash <mathew1800@gmail.com>2019-03-05 15:47:03 -0500
commitc161389a0f0b0fe3b9d6400c45fd87152f2cb14c (patch)
treeb050bdbd77611a1205028b6307f4aca72e1c7417 /src/core/core.cpp
parent9d9676f62055e9a765796d113ec110259a576927 (diff)
kernel/address_arbiter: Pass in system instance to constructor
Allows getting rid of reliance on the global accessor functions and instead operating on the provided system instance.
Diffstat (limited to 'src/core/core.cpp')
-rw-r--r--src/core/core.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/core/core.cpp b/src/core/core.cpp
index ab7181a05e..6dda20faa7 100644
--- a/src/core/core.cpp
+++ b/src/core/core.cpp
@@ -78,6 +78,7 @@ FileSys::VirtualFile GetGameFileFromPath(const FileSys::VirtualFilesystem& vfs,
return vfs->OpenFile(path, FileSys::Mode::Read);
}
struct System::Impl {
+ explicit Impl(System& system) : kernel{system} {}
Cpu& CurrentCpuCore() {
return cpu_core_manager.GetCurrentCore();
@@ -95,7 +96,7 @@ struct System::Impl {
LOG_DEBUG(HW_Memory, "initialized OK");
core_timing.Initialize();
- kernel.Initialize(core_timing);
+ kernel.Initialize();
const auto current_time = std::chrono::duration_cast<std::chrono::seconds>(
std::chrono::system_clock::now().time_since_epoch());
@@ -265,7 +266,7 @@ struct System::Impl {
Core::FrameLimiter frame_limiter;
};
-System::System() : impl{std::make_unique<Impl>()} {}
+System::System() : impl{std::make_unique<Impl>(*this)} {}
System::~System() = default;
Cpu& System::CurrentCpuCore() {