System: Log FPS/frame times every second

This commit is contained in:
Connor McLaughlin 2020-12-07 23:37:03 +10:00
parent b44a654943
commit a965d78a87
1 changed files with 4 additions and 0 deletions

View File

@ -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();
} }