mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
Replace "Log FPS to file" by the "Log render time to file" feature.
This commit is contained in:
@ -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,24 +32,14 @@ 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)
|
||||
{
|
||||
if (!s_bench_file.is_open())
|
||||
s_bench_file.open(File::GetUserPath(D_LOGS_IDX) + "fps.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");
|
||||
if (!s_bench_file.is_open())
|
||||
s_bench_file.open(File::GetUserPath(D_LOGS_IDX) + "render_time.txt");
|
||||
|
||||
s_time_file << StringFromFormat("%lu\n", val);
|
||||
s_bench_file << StringFromFormat("%lu\n", val);
|
||||
}
|
||||
|
||||
int Update()
|
||||
@ -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)
|
||||
|
Reference in New Issue
Block a user