mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
FPSCounter: Flush the logs every second and close them when the renderer is shut down.
This commit is contained in:
@ -34,6 +34,12 @@ void Initialize()
|
||||
s_bench_file.close();
|
||||
}
|
||||
|
||||
void Shutdown()
|
||||
{
|
||||
if (s_bench_file.is_open())
|
||||
s_bench_file.close();
|
||||
}
|
||||
|
||||
static void LogRenderTimeToFile(u64 val)
|
||||
{
|
||||
if (!s_bench_file.is_open())
|
||||
@ -49,6 +55,7 @@ int Update()
|
||||
s_update_time.Update();
|
||||
s_fps = s_counter - s_fps_last_counter;
|
||||
s_fps_last_counter = s_counter;
|
||||
s_bench_file.flush();
|
||||
}
|
||||
|
||||
if (g_ActiveConfig.bLogRenderTimeToFile)
|
||||
|
Reference in New Issue
Block a user