diff options
author | Lioncash <mathew1800@gmail.com> | 2020-08-03 14:14:21 +0200 |
---|---|---|
committer | Lioncash <mathew1800@gmail.com> | 2020-08-03 18:33:40 +0200 |
commit | 570150bc86c104529a249ccd59f00a492011a9db (patch) | |
tree | 3c5e1d0e2c83edabb1ccd23291f98e3276e2116e /src/core | |
parent | perf_stats: Mark GetMeanFrametime() as const (diff) | |
download | yuzu-570150bc86c104529a249ccd59f00a492011a9db.tar yuzu-570150bc86c104529a249ccd59f00a492011a9db.tar.gz yuzu-570150bc86c104529a249ccd59f00a492011a9db.tar.bz2 yuzu-570150bc86c104529a249ccd59f00a492011a9db.tar.lz yuzu-570150bc86c104529a249ccd59f00a492011a9db.tar.xz yuzu-570150bc86c104529a249ccd59f00a492011a9db.tar.zst yuzu-570150bc86c104529a249ccd59f00a492011a9db.zip |
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/perf_stats.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/core/perf_stats.cpp b/src/core/perf_stats.cpp index 36372c66f..b899ac884 100644 --- a/src/core/perf_stats.cpp +++ b/src/core/perf_stats.cpp @@ -95,12 +95,13 @@ PerfStatsResults PerfStats::GetAndResetStats(microseconds current_system_time_us const auto system_us_per_second = (current_system_time_us - reset_point_system_us) / interval; - PerfStatsResults results{}; - results.system_fps = static_cast<double>(system_frames) / interval; - results.game_fps = static_cast<double>(game_frames) / interval; - results.frametime = duration_cast<DoubleSecs>(accumulated_frametime).count() / - static_cast<double>(system_frames); - results.emulation_speed = system_us_per_second.count() / 1'000'000.0; + const PerfStatsResults results{ + .system_fps = static_cast<double>(system_frames) / interval, + .game_fps = static_cast<double>(game_frames) / interval, + .frametime = duration_cast<DoubleSecs>(accumulated_frametime).count() / + static_cast<double>(system_frames), + .emulation_speed = system_us_per_second.count() / 1'000'000.0, + }; // Reset counters reset_point = now; |