diff options
author | James Rowe <jroweboy@gmail.com> | 2019-02-16 03:52:11 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-02-16 03:52:11 +0100 |
commit | 99da6362c43a24c608a2790f668f10a62e3b80a6 (patch) | |
tree | 6257ac07283ebb4ea5ac622784cc7a041d48f8b1 /src/core/core.cpp | |
parent | Merge pull request #2112 from lioncash/shadowing (diff) | |
parent | core_timing: Convert core timing into a class (diff) | |
download | yuzu-99da6362c43a24c608a2790f668f10a62e3b80a6.tar yuzu-99da6362c43a24c608a2790f668f10a62e3b80a6.tar.gz yuzu-99da6362c43a24c608a2790f668f10a62e3b80a6.tar.bz2 yuzu-99da6362c43a24c608a2790f668f10a62e3b80a6.tar.lz yuzu-99da6362c43a24c608a2790f668f10a62e3b80a6.tar.xz yuzu-99da6362c43a24c608a2790f668f10a62e3b80a6.tar.zst yuzu-99da6362c43a24c608a2790f668f10a62e3b80a6.zip |
Diffstat (limited to 'src/core/core.cpp')
-rw-r--r-- | src/core/core.cpp | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/src/core/core.cpp b/src/core/core.cpp index 4d9d21ee4..8aa0932c5 100644 --- a/src/core/core.cpp +++ b/src/core/core.cpp @@ -94,8 +94,8 @@ struct System::Impl { ResultStatus Init(System& system, Frontend::EmuWindow& emu_window) { LOG_DEBUG(HW_Memory, "initialized OK"); - Timing::Init(); - kernel.Initialize(); + core_timing.Initialize(); + kernel.Initialize(core_timing); const auto current_time = std::chrono::duration_cast<std::chrono::seconds>( std::chrono::system_clock::now().time_since_epoch()); @@ -120,7 +120,7 @@ struct System::Impl { telemetry_session = std::make_unique<Core::TelemetrySession>(); service_manager = std::make_shared<Service::SM::ServiceManager>(); - Service::Init(service_manager, *virtual_filesystem); + Service::Init(service_manager, system, *virtual_filesystem); GDBStub::Init(); renderer = VideoCore::CreateRenderer(emu_window, system); @@ -205,7 +205,7 @@ struct System::Impl { // Shutdown kernel and core timing kernel.Shutdown(); - Timing::Shutdown(); + core_timing.Shutdown(); // Close app loader app_loader.reset(); @@ -232,9 +232,10 @@ struct System::Impl { } PerfStatsResults GetAndResetPerfStats() { - return perf_stats.GetAndResetStats(Timing::GetGlobalTimeUs()); + return perf_stats.GetAndResetStats(core_timing.GetGlobalTimeUs()); } + Timing::CoreTiming core_timing; Kernel::KernelCore kernel; /// RealVfsFilesystem instance FileSys::VirtualFilesystem virtual_filesystem; @@ -396,6 +397,14 @@ const Kernel::KernelCore& System::Kernel() const { return impl->kernel; } +Timing::CoreTiming& System::CoreTiming() { + return impl->core_timing; +} + +const Timing::CoreTiming& System::CoreTiming() const { + return impl->core_timing; +} + Core::PerfStats& System::GetPerfStats() { return impl->perf_stats; } |