From d78aec9c1a6760f34507fe754bb6d9dc068152a9 Mon Sep 17 00:00:00 2001 From: David Hackbarth Date: Wed, 24 Sep 2025 12:21:29 +0200 Subject: [PATCH] add fps output --- GDP/D3D9/Time.cpp | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/GDP/D3D9/Time.cpp b/GDP/D3D9/Time.cpp index fa007c4..6ccdfea 100644 --- a/GDP/D3D9/Time.cpp +++ b/GDP/D3D9/Time.cpp @@ -1,4 +1,8 @@ #include "Time.h" +#if _DEBUG +#include +#endif // _DEBUG + UINT Time::init() { @@ -14,7 +18,15 @@ void Time::update() _lastFrame = now; _deltaTime = diff.count(); - +#ifdef _DEBUG +#ifdef UNICODE + wstring output = L"fps: " + to_wstring(1 / _deltaTime) + L"\n"; + OutputDebugString(output.c_str()); +#else // !UNICODE + string output = "fps: " + to_string(1 / _deltaTime) + "\n"; + OutputDebugString(output.c_str()); +#endif // UNICODE +#endif // DEBUG } void Time::deInit()