summaryrefslogtreecommitdiff
path: root/src/openttd.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/openttd.cpp')
-rw-r--r--src/openttd.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/openttd.cpp b/src/openttd.cpp
index 43c6b1170..510f00427 100644
--- a/src/openttd.cpp
+++ b/src/openttd.cpp
@@ -63,6 +63,7 @@
#include "subsidy_func.h"
#include "gfx_layout.h"
#include "viewport_sprite_sorter.h"
+#include "framerate_type.h"
#include "linkgraph/linkgraphschedule.h"
@@ -1336,6 +1337,14 @@ void StateGameLoop()
{
/* don't execute the state loop during pause */
if (_pause_mode != PM_UNPAUSED) {
+ PerformanceMeasurer::Paused(PFE_GAMELOOP);
+ PerformanceMeasurer::Paused(PFE_GL_ECONOMY);
+ PerformanceMeasurer::Paused(PFE_GL_TRAINS);
+ PerformanceMeasurer::Paused(PFE_GL_ROADVEHS);
+ PerformanceMeasurer::Paused(PFE_GL_SHIPS);
+ PerformanceMeasurer::Paused(PFE_GL_AIRCRAFT);
+ PerformanceMeasurer::Paused(PFE_GL_LANDSCAPE);
+
UpdateLandscapingLimits();
#ifndef DEBUG_DUMP_COMMANDS
Game::GameLoop();
@@ -1343,6 +1352,9 @@ void StateGameLoop()
CallWindowTickEvent();
return;
}
+
+ PerformanceMeasurer framerate(PFE_GAMELOOP);
+ PerformanceAccumulator::Reset(PFE_GL_LANDSCAPE);
if (HasModalProgress()) return;
Layouter::ReduceLineCache();