summaryrefslogtreecommitdiff
path: root/src/openttd.cpp
diff options
context:
space:
mode:
authorNiels Martin Hansen <nielsm@indvikleren.dk>2019-02-04 01:26:55 +0100
committerNiels Martin Hansen <nielsm@indvikleren.dk>2019-02-23 14:29:07 +0100
commit7e1e2756d4fdbd9c2fb3508b4213de8dc855f21c (patch)
tree15e4f7b212bafdd3e83653aca1a465a5f6f4461b /src/openttd.cpp
parent4adb91202d7c0118b52daeab2c4e6b040b30e4a9 (diff)
downloadopenttd-7e1e2756d4fdbd9c2fb3508b4213de8dc855f21c.tar.xz
Add: Show performance of AI and GS in framerate window
Diffstat (limited to 'src/openttd.cpp')
-rw-r--r--src/openttd.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/openttd.cpp b/src/openttd.cpp
index e876ffda7..6265b9684 100644
--- a/src/openttd.cpp
+++ b/src/openttd.cpp
@@ -1407,8 +1407,11 @@ void StateGameLoop()
BasePersistentStorageArray::SwitchMode(PSM_LEAVE_GAMELOOP);
#ifndef DEBUG_DUMP_COMMANDS
- AI::GameLoop();
- Game::GameLoop();
+ {
+ PerformanceMeasurer framerate(PFE_ALLSCRIPTS);
+ AI::GameLoop();
+ Game::GameLoop();
+ }
#endif
UpdateLandscapingLimits();