diff options
author | Yuri Kunde Schlesner <yuriks@yuriks.net> | 2017-02-27 02:51:15 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-02-27 02:51:15 +0100 |
commit | b250ce21b9a62cb573540fdb14f30c28fa66e6ad (patch) | |
tree | ef55a0cd4a531a097de2152f563d712551972c4b /src/core/core.cpp | |
parent | Merge pull request #2595 from jroweboy/patch (diff) | |
parent | PerfStats: Re-order and document members better (diff) | |
download | yuzu-b250ce21b9a62cb573540fdb14f30c28fa66e6ad.tar yuzu-b250ce21b9a62cb573540fdb14f30c28fa66e6ad.tar.gz yuzu-b250ce21b9a62cb573540fdb14f30c28fa66e6ad.tar.bz2 yuzu-b250ce21b9a62cb573540fdb14f30c28fa66e6ad.tar.lz yuzu-b250ce21b9a62cb573540fdb14f30c28fa66e6ad.tar.xz yuzu-b250ce21b9a62cb573540fdb14f30c28fa66e6ad.tar.zst yuzu-b250ce21b9a62cb573540fdb14f30c28fa66e6ad.zip |
Diffstat (limited to 'src/core/core.cpp')
-rw-r--r-- | src/core/core.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/core/core.cpp b/src/core/core.cpp index c9c9b7615..140ff6451 100644 --- a/src/core/core.cpp +++ b/src/core/core.cpp @@ -109,6 +109,10 @@ void System::PrepareReschedule() { reschedule_pending = true; } +PerfStats::Results System::GetAndResetPerfStats() { + return perf_stats.GetAndResetStats(CoreTiming::GetGlobalTimeUs()); +} + void System::Reschedule() { if (!reschedule_pending) { return; @@ -140,6 +144,10 @@ System::ResultStatus System::Init(EmuWindow* emu_window, u32 system_mode) { LOG_DEBUG(Core, "Initialized OK"); + // Reset counters and set time origin to current frame + GetAndResetPerfStats(); + perf_stats.BeginSystemFrame(); + return ResultStatus::Success; } |