diff options
author | Yuri Kunde Schlesner <yuriks@yuriks.net> | 2017-02-26 17:51:15 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-02-26 17:51:15 -0800 |
commit | b250ce21b9a62cb573540fdb14f30c28fa66e6ad (patch) | |
tree | ef55a0cd4a531a097de2152f563d712551972c4b /src/core/core.cpp | |
parent | f2ae2a7ff2a053d019985f70a2cc999c8d8bb844 (diff) | |
parent | 174464a87f2e1709597bc1e0cb08c877487a771b (diff) |
Merge pull request #2587 from yuriks/status-bar
Replace built-in Profiler with indicators in status bar
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; } |