diff options
author | Niels Martin Hansen <nielsm@indvikleren.dk> | 2018-07-19 21:17:07 +0200 |
---|---|---|
committer | Patric Stout <truebrain@openttd.org> | 2018-07-19 21:17:07 +0200 |
commit | 2a868b9f3b8e3b5f8b9e5f728f628ec88fd5e3ad (patch) | |
tree | 36da708e128fc68d9ceac32362503df43af2fc22 /src/window.cpp | |
parent | a3d1950b656787b76fbccec1aedd63407c34c2f1 (diff) | |
download | openttd-2a868b9f3b8e3b5f8b9e5f728f628ec88fd5e3ad.tar.xz |
Feature: Framerate display window (#6822)
Frame rate and various game loop/graphics timing measurements and graphs. Accessible via the Help menu, and can print some stats in the console via the fps command.
Diffstat (limited to 'src/window.cpp')
-rw-r--r-- | src/window.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/window.cpp b/src/window.cpp index e2ce84542..d46447d52 100644 --- a/src/window.cpp +++ b/src/window.cpp @@ -36,6 +36,7 @@ #include "error.h" #include "game/game.hpp" #include "video/video_driver.hpp" +#include "framerate_type.h" #include "safeguards.h" @@ -3077,6 +3078,9 @@ void InputLoop() */ void UpdateWindows() { + PerformanceMeasurer framerate(PFE_DRAWING); + PerformanceAccumulator::Reset(PFE_DRAWWORLD); + Window *w; static int highlight_timer = 1; |