Beispiel #1
0
static void LogFPSToFile(unsigned long val)
{
	if (!s_bench_file.IsOpen())
		s_bench_file.Open(File::GetUserPath(D_LOGS_IDX) + "fps.txt", "w");

	char buffer[256];
	snprintf(buffer, 256, "%ld\n", val);
	s_bench_file.WriteArray(buffer, strlen(buffer));
}
Beispiel #2
0
void InitFPSCounter()
{
	s_counter = s_fps_last_counter = 0;
	s_fps = 0;
	s_last_update_time = Common::Timer::GetTimeMs();

	if (s_bench_file.IsOpen())
		s_bench_file.Close();
}