forked from mirror/OpenTTD
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.
This commit is contained in:
committed by
Patric Stout
parent
a3d1950b65
commit
2a868b9f3b
@@ -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;
|
||||
|
||||
|
Reference in New Issue
Block a user