mirror of
https://github.com/RetroDECK/Duckstation.git
synced 2024-11-23 14:25:37 +00:00
System: Log FPS/frame times every second
This commit is contained in:
parent
0f8f9bc052
commit
98d6b49987
|
@ -1214,6 +1214,7 @@ void UpdateThrottlePeriod()
|
||||||
{
|
{
|
||||||
s_throttle_period =
|
s_throttle_period =
|
||||||
static_cast<s32>(1000000000.0 / static_cast<double>(s_throttle_frequency) / static_cast<double>(s_target_speed));
|
static_cast<s32>(1000000000.0 / static_cast<double>(s_throttle_frequency) / static_cast<double>(s_target_speed));
|
||||||
|
ResetThrottler();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ResetThrottler()
|
void ResetThrottler()
|
||||||
|
@ -1296,6 +1297,9 @@ void UpdatePerformanceCounters()
|
||||||
s_last_global_tick_counter = global_tick_counter;
|
s_last_global_tick_counter = global_tick_counter;
|
||||||
s_fps_timer.Reset();
|
s_fps_timer.Reset();
|
||||||
|
|
||||||
|
Log_PerfPrintf("FPS: %.2f VPS: %.2f Average: %.2fms Worst: %.2fms", s_fps, s_vps, s_average_frame_time,
|
||||||
|
s_worst_frame_time);
|
||||||
|
|
||||||
g_host_interface->OnSystemPerformanceCountersUpdated();
|
g_host_interface->OnSystemPerformanceCountersUpdated();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue