diff options
| author | Jules Blok <jules.blok@gmail.com> | 2014-07-09 22:30:34 +0200 |
|---|---|---|
| committer | Jules Blok <jules.blok@gmail.com> | 2014-07-10 23:11:28 +0200 |
| commit | 6def4ead01bfcf3b5b12bbb7e16f21217d6088bf (patch) | |
| tree | 7b7b61b54355ed4334f877e3bb478f0e23acc438 /Source/Core/VideoCommon/FPSCounter.cpp | |
| parent | 1754cbda9d028307443ffd1e3e51ec1849d95ade (diff) | |
FPSCounter: Flush the logs every second and close them when the renderer is shut down.
Diffstat (limited to 'Source/Core/VideoCommon/FPSCounter.cpp')
| -rw-r--r-- | Source/Core/VideoCommon/FPSCounter.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Source/Core/VideoCommon/FPSCounter.cpp b/Source/Core/VideoCommon/FPSCounter.cpp index 10bfebb26f..c9615a2f68 100644 --- a/Source/Core/VideoCommon/FPSCounter.cpp +++ b/Source/Core/VideoCommon/FPSCounter.cpp @@ -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) |
