diff options
| author | 2017-02-20 13:56:58 -0800 | |
|---|---|---|
| committer | 2017-02-26 17:22:03 -0800 | |
| commit | b285c2a4ed29a126b5bcfe46e2784bd1870bdf82 (patch) | |
| tree | a671ac87427fb63a64f51be260928cb39b8d3737 /src/core/core.cpp | |
| parent | Qt: Add tooltips to status bar displays (diff) | |
| download | yuzu-b285c2a4ed29a126b5bcfe46e2784bd1870bdf82.tar.gz yuzu-b285c2a4ed29a126b5bcfe46e2784bd1870bdf82.tar.xz yuzu-b285c2a4ed29a126b5bcfe46e2784bd1870bdf82.zip | |
Core: Make PerfStats internally locked
More ergonomic to use and will be required for upcoming changes.
Diffstat (limited to 'src/core/core.cpp')
| -rw-r--r-- | src/core/core.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/core/core.cpp b/src/core/core.cpp index ca2c28ce4..140ff6451 100644 --- a/src/core/core.cpp +++ b/src/core/core.cpp | |||
| @@ -110,8 +110,7 @@ void System::PrepareReschedule() { | |||
| 110 | } | 110 | } |
| 111 | 111 | ||
| 112 | PerfStats::Results System::GetAndResetPerfStats() { | 112 | PerfStats::Results System::GetAndResetPerfStats() { |
| 113 | auto perf_stats = this->perf_stats.Lock(); | 113 | return perf_stats.GetAndResetStats(CoreTiming::GetGlobalTimeUs()); |
| 114 | return perf_stats->GetAndResetStats(CoreTiming::GetGlobalTimeUs()); | ||
| 115 | } | 114 | } |
| 116 | 115 | ||
| 117 | void System::Reschedule() { | 116 | void System::Reschedule() { |
| @@ -147,7 +146,7 @@ System::ResultStatus System::Init(EmuWindow* emu_window, u32 system_mode) { | |||
| 147 | 146 | ||
| 148 | // Reset counters and set time origin to current frame | 147 | // Reset counters and set time origin to current frame |
| 149 | GetAndResetPerfStats(); | 148 | GetAndResetPerfStats(); |
| 150 | perf_stats.Lock()->BeginSystemFrame(); | 149 | perf_stats.BeginSystemFrame(); |
| 151 | 150 | ||
| 152 | return ResultStatus::Success; | 151 | return ResultStatus::Success; |
| 153 | } | 152 | } |