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:
Niels Martin Hansen
2018-07-19 21:17:07 +02:00
committed by Patric Stout
parent a3d1950b65
commit 2a868b9f3b
33 changed files with 1194 additions and 11 deletions

View File

@@ -23,6 +23,7 @@
#include "../progress.h"
#include "../window_gui.h"
#include "../window_func.h"
#include "../framerate_type.h"
#include "win32_v.h"
#include <windows.h>
#include <imm.h>
@@ -359,6 +360,8 @@ bool VideoDriver_Win32::MakeWindow(bool full_screen)
/** Do palette animation and blit to the window. */
static void PaintWindow(HDC dc)
{
PerformanceMeasurer framerate(PFE_VIDEO);
HDC dc2 = CreateCompatibleDC(dc);
HBITMAP old_bmp = (HBITMAP)SelectObject(dc2, _wnd.dib_sect);
HPALETTE old_palette = SelectPalette(dc, _wnd.gdi_palette, FALSE);