From eb9e30004c370660733df60b434b0071cd16a596 Mon Sep 17 00:00:00 2001 From: Causeless Date: Mon, 25 Dec 2023 23:54:51 +0000 Subject: [PATCH] Fixed brief slowmo at activity start --- Managers/ActivityMan.cpp | 3 +++ Managers/PerformanceMan.h | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/Managers/ActivityMan.cpp b/Managers/ActivityMan.cpp index fd08699e5..7208029b1 100644 --- a/Managers/ActivityMan.cpp +++ b/Managers/ActivityMan.cpp @@ -330,6 +330,8 @@ namespace RTE { m_LastMusicPos = 0; g_AudioMan.PauseIngameSounds(false); + g_PerformanceMan.ResetPerformanceTimings(); + return error; } @@ -397,6 +399,7 @@ namespace RTE { PauseActivity(false); g_TimerMan.PauseSim(false); + g_PerformanceMan.ResetPerformanceTimings(); } } diff --git a/Managers/PerformanceMan.h b/Managers/PerformanceMan.h index a94f90416..5e6d009af 100644 --- a/Managers/PerformanceMan.h +++ b/Managers/PerformanceMan.h @@ -131,6 +131,11 @@ namespace RTE { #pragma endregion #pragma region Concrete Methods + /// + /// Clears current performance timings. + /// + void ResetPerformanceTimings() { m_MSPSUs.clear(); m_MSPFs.clear(); m_MSPUs.clear(); m_MSPDs.clear(); } + /// /// Resets the sim update timer. ///