diff options
| author | Jules Blok <jules.blok@gmail.com> | 2014-07-09 17:56:11 +0200 |
|---|---|---|
| committer | Jules Blok <jules.blok@gmail.com> | 2014-07-09 17:56:11 +0200 |
| commit | 95b579746f80d477eedd2ba43fa403b570620986 (patch) | |
| tree | b08d02bed2c4833928604c6731d8b5dfab5dccb5 /Source/Core/VideoCommon | |
| parent | 61d44cf73fd6ab337e4108081363b5617418e988 (diff) | |
Replace "Log FPS to file" by the "Log render time to file" feature.
Diffstat (limited to 'Source/Core/VideoCommon')
| -rw-r--r-- | Source/Core/VideoCommon/FPSCounter.cpp | 19 | ||||
| -rw-r--r-- | Source/Core/VideoCommon/VideoConfig.cpp | 2 | ||||
| -rw-r--r-- | Source/Core/VideoCommon/VideoConfig.h | 1 |
3 files changed, 3 insertions, 19 deletions
diff --git a/Source/Core/VideoCommon/FPSCounter.cpp b/Source/Core/VideoCommon/FPSCounter.cpp index 8509889d5f..e678abe0b1 100644 --- a/Source/Core/VideoCommon/FPSCounter.cpp +++ b/Source/Core/VideoCommon/FPSCounter.cpp @@ -18,10 +18,9 @@ static unsigned int s_counter = 0; static unsigned int s_fps = 0; static unsigned int s_fps_last_counter = 0; static Common::Timer s_update_time; -static std::ofstream s_bench_file; static Common::Timer s_render_time; -static std::ofstream s_time_file; +static std::ofstream s_bench_file; void Initialize() { @@ -33,26 +32,16 @@ void Initialize() if (s_bench_file.is_open()) s_bench_file.close(); - if (s_time_file.is_open()) - s_time_file.close(); } -static void LogFPSToFile(u64 val) +static void LogRenderTimeToFile(u64 val) { if (!s_bench_file.is_open()) - s_bench_file.open(File::GetUserPath(D_LOGS_IDX) + "fps.txt"); + s_bench_file.open(File::GetUserPath(D_LOGS_IDX) + "render_time.txt"); s_bench_file << StringFromFormat("%lu\n", val); } -static void LogRenderTimeToFile(u64 val) -{ - if (!s_time_file.is_open()) - s_time_file.open(File::GetUserPath(D_LOGS_IDX) + "render_time.txt"); - - s_time_file << StringFromFormat("%lu\n", val); -} - int Update() { if (s_update_time.GetTimeDifference() >= FPS_REFRESH_INTERVAL) @@ -60,8 +49,6 @@ int Update() s_update_time.Update(); s_fps = s_counter - s_fps_last_counter; s_fps_last_counter = s_counter; - if (g_ActiveConfig.bLogFPSToFile) - LogFPSToFile(s_fps); } if (g_ActiveConfig.bLogRenderTimeToFile) diff --git a/Source/Core/VideoCommon/VideoConfig.cpp b/Source/Core/VideoCommon/VideoConfig.cpp index aa68ff2e76..77e4eb819c 100644 --- a/Source/Core/VideoCommon/VideoConfig.cpp +++ b/Source/Core/VideoCommon/VideoConfig.cpp @@ -57,7 +57,6 @@ void VideoConfig::Load(const std::string& ini_file) settings->Get("UseRealXFB", &bUseRealXFB, 0); settings->Get("SafeTextureCacheColorSamples", &iSafeTextureCache_ColorSamples,128); settings->Get("ShowFPS", &bShowFPS, false); - settings->Get("LogFPSToFile", &bLogFPSToFile, false); settings->Get("LogRenderTimeToFile", &bLogRenderTimeToFile, false); settings->Get("ShowInputDisplay", &bShowInputDisplay, false); settings->Get("OverlayStats", &bOverlayStats, false); @@ -230,7 +229,6 @@ void VideoConfig::Save(const std::string& ini_file) settings->Set("UseRealXFB", bUseRealXFB); settings->Set("SafeTextureCacheColorSamples", iSafeTextureCache_ColorSamples); settings->Set("ShowFPS", bShowFPS); - settings->Set("LogFPSToFile", bLogFPSToFile); settings->Set("LogRenderTimeToFile", bLogRenderTimeToFile); settings->Set("ShowInputDisplay", bShowInputDisplay); settings->Set("OverlayStats", bOverlayStats); diff --git a/Source/Core/VideoCommon/VideoConfig.h b/Source/Core/VideoCommon/VideoConfig.h index 3200de8afd..595ded24ec 100644 --- a/Source/Core/VideoCommon/VideoConfig.h +++ b/Source/Core/VideoCommon/VideoConfig.h @@ -83,7 +83,6 @@ struct VideoConfig final bool bTexFmtOverlayEnable; bool bTexFmtOverlayCenter; bool bShowEFBCopyRegions; - bool bLogFPSToFile; bool bLogRenderTimeToFile; // Render |
