forked from eden-emu/eden
Core: Make PerfStats internally locked
More ergonomic to use and will be required for upcoming changes.
This commit is contained in:
parent
f273959205
commit
b285c2a4ed
7 changed files with 25 additions and 16 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue