perf_stats: Make use of designated initializers
Same behavior, but allows us to avoid a now-unnecessary zero initialization.
This commit is contained in:
parent
d767be65be
commit
570150bc86
|
@ -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;
|
const auto system_us_per_second = (current_system_time_us - reset_point_system_us) / interval;
|
||||||
|
|
||||||
PerfStatsResults results{};
|
const PerfStatsResults results{
|
||||||
results.system_fps = static_cast<double>(system_frames) / interval;
|
.system_fps = static_cast<double>(system_frames) / interval,
|
||||||
results.game_fps = static_cast<double>(game_frames) / interval;
|
.game_fps = static_cast<double>(game_frames) / interval,
|
||||||
results.frametime = duration_cast<DoubleSecs>(accumulated_frametime).count() /
|
.frametime = duration_cast<DoubleSecs>(accumulated_frametime).count() /
|
||||||
static_cast<double>(system_frames);
|
static_cast<double>(system_frames),
|
||||||
results.emulation_speed = system_us_per_second.count() / 1'000'000.0;
|
.emulation_speed = system_us_per_second.count() / 1'000'000.0,
|
||||||
|
};
|
||||||
|
|
||||||
// Reset counters
|
// Reset counters
|
||||||
reset_point = now;
|
reset_point = now;
|
||||||
|
|
Loading…
Reference in New Issue