From 4b5ca9923cf14526ba88a0a694e0e12229888a8c Mon Sep 17 00:00:00 2001 From: Filoppi Date: Wed, 1 Jul 2020 22:29:30 +0300 Subject: Fixes the timer returning 1 when it should return 0. The case mentioned by the comment does not exist anymore. Also added a IsRunning function as it was impossible to know whether it had been started or not (I will use it in later PRs but it should be there anyway) --- Source/Core/Common/Timer.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'Source/Core/Common/Timer.cpp') diff --git a/Source/Core/Common/Timer.cpp b/Source/Core/Common/Timer.cpp index 794f2dfd49..aa5e2ff173 100644 --- a/Source/Core/Common/Timer.cpp +++ b/Source/Core/Common/Timer.cpp @@ -118,10 +118,9 @@ void Timer::AddTimeDifference() // Get the time elapsed since the Start() u64 Timer::GetTimeElapsed() { - // If we have not started yet, return 1 (because then I don't - // have to change the FPS calculation in CoreRerecording.cpp . + // If we have not started yet, return zero if (m_StartTime == 0) - return 1; + return 0; // Return the final timer time if the timer is stopped if (!m_Running) -- cgit v1.2.3