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
@@ -87,6 +87,7 @@
|
||||
#include "company_base.h"
|
||||
#include "command_func.h"
|
||||
#include "network/network_func.h"
|
||||
#include "framerate_type.h"
|
||||
|
||||
#include <map>
|
||||
|
||||
@@ -1654,6 +1655,8 @@ static inline void ViewportDraw(const ViewPort *vp, int left, int top, int right
|
||||
*/
|
||||
void Window::DrawViewport() const
|
||||
{
|
||||
PerformanceAccumulator framerate(PFE_DRAWWORLD);
|
||||
|
||||
DrawPixelInfo *dpi = _cur_dpi;
|
||||
|
||||
dpi->left += this->left;
|
||||
|
Reference in New Issue
Block a user