Core: Make PerfStats internally locked

More ergonomic to use and will be required for upcoming changes.
This commit is contained in:
Yuri Kunde Schlesner committed 2017-02-26 17:22:03 -08:00
1 parent f273959205
commit b285c2a4ed
7 files changed
+25 -16

No files matched your search

+2 -3
View File
@@ -110,8 +110,7 @@ void System::PrepareReschedule() {
}
PerfStats::Results System::GetAndResetPerfStats() {
auto perf_stats = this->perf_stats.Lock();
return perf_stats->GetAndResetStats(CoreTiming::GetGlobalTimeUs());
return perf_stats.GetAndResetStats(CoreTiming::GetGlobalTimeUs());
}
void System::Reschedule() {
@@ -147,7 +146,7 @@ System::ResultStatus System::Init(EmuWindow* emu_window, u32 system_mode) {
// Reset counters and set time origin to current frame
GetAndResetPerfStats();
perf_stats.Lock()->BeginSystemFrame();
perf_stats.BeginSystemFrame();
return ResultStatus::Success;
}