summaryrefslogtreecommitdiff
path: root/src/video/allegro_v.cpp
diff options
context:
space:
mode:
authorNiels Martin Hansen <nielsm@indvikleren.dk>2018-07-19 21:17:07 +0200
committerPatric Stout <truebrain@openttd.org>2018-07-19 21:17:07 +0200
commit2a868b9f3b8e3b5f8b9e5f728f628ec88fd5e3ad (patch)
tree36da708e128fc68d9ceac32362503df43af2fc22 /src/video/allegro_v.cpp
parenta3d1950b656787b76fbccec1aedd63407c34c2f1 (diff)
downloadopenttd-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/video/allegro_v.cpp')
-rw-r--r--src/video/allegro_v.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/video/allegro_v.cpp b/src/video/allegro_v.cpp
index 50fe0c499..960d7fb7c 100644
--- a/src/video/allegro_v.cpp
+++ b/src/video/allegro_v.cpp
@@ -24,6 +24,7 @@
#include "../network/network.h"
#include "../core/random_func.hpp"
#include "../core/math_func.hpp"
+#include "../framerate_type.h"
#include "allegro_v.h"
#include <allegro.h>
@@ -56,6 +57,8 @@ void VideoDriver_Allegro::MakeDirty(int left, int top, int width, int height)
static void DrawSurfaceToScreen()
{
+ PerformanceMeasurer framerate(PFE_VIDEO);
+
int n = _num_dirty_rects;
if (n == 0) return;