summaryrefslogtreecommitdiff
path: root/src/core/core.cpp
diff options
context:
space:
mode:
authorGravatar Yuri Kunde Schlesner2017-02-19 14:34:47 -0800
committerGravatar Yuri Kunde Schlesner2017-02-26 17:22:03 -0800
commitc75ae6c585f651a1b7c162c2e1ecccd22a1c587d (patch)
tree30d51f39c6b57244e1ede29820c3f5d98ca38451 /src/core/core.cpp
parentSynchronizedWrapper: Add Lock convenience method (diff)
downloadyuzu-c75ae6c585f651a1b7c162c2e1ecccd22a1c587d.tar.gz
yuzu-c75ae6c585f651a1b7c162c2e1ecccd22a1c587d.tar.xz
yuzu-c75ae6c585f651a1b7c162c2e1ecccd22a1c587d.zip
Add performance statistics to status bar
Diffstat (limited to 'src/core/core.cpp')
-rw-r--r--src/core/core.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/core/core.cpp b/src/core/core.cpp
index c9c9b7615..ca2c28ce4 100644
--- a/src/core/core.cpp
+++ b/src/core/core.cpp
@@ -109,6 +109,11 @@ void System::PrepareReschedule() {
109 reschedule_pending = true; 109 reschedule_pending = true;
110} 110}
111 111
112PerfStats::Results System::GetAndResetPerfStats() {
113 auto perf_stats = this->perf_stats.Lock();
114 return perf_stats->GetAndResetStats(CoreTiming::GetGlobalTimeUs());
115}
116
112void System::Reschedule() { 117void System::Reschedule() {
113 if (!reschedule_pending) { 118 if (!reschedule_pending) {
114 return; 119 return;
@@ -140,6 +145,10 @@ System::ResultStatus System::Init(EmuWindow* emu_window, u32 system_mode) {
140 145
141 LOG_DEBUG(Core, "Initialized OK"); 146 LOG_DEBUG(Core, "Initialized OK");
142 147
148 // Reset counters and set time origin to current frame
149 GetAndResetPerfStats();
150 perf_stats.Lock()->BeginSystemFrame();
151
143 return ResultStatus::Success; 152 return ResultStatus::Success;
144} 153}
145 154