From 2e6a264738d8e6f9f34b0898e1127dd510931d9a Mon Sep 17 00:00:00 2001 From: FunkyFr3sh Date: Thu, 5 Jul 2018 19:41:48 +0200 Subject: [PATCH] call DrawText before CounterStart --- src/render.c | 8 ++++---- src/render_soft.c | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/render.c b/src/render.c index 5cee066..12a5a76 100644 --- a/src/render.c +++ b/src/render.c @@ -421,6 +421,10 @@ DWORD WINAPI render_main(void) static char debugText[512] = { 0 }; static double frameTime = 0; RECT debugrc = { 0, 0, ddraw->width, ddraw->height }; + + if (ddraw->primary && ddraw->primary->palette) + DrawText(ddraw->primary->hDC, debugText, -1, &debugrc, DT_NOCLIP); + tick_start = timeGetTime(); if (tick_start >= tick_fps) { @@ -434,10 +438,6 @@ DWORD WINAPI render_main(void) CounterStart(); } - - if (ddraw->primary && ddraw->primary->palette) - DrawText(ddraw->primary->hDC, debugText, -1, &debugrc, DT_NOCLIP); - frame_count++; #endif diff --git a/src/render_soft.c b/src/render_soft.c index b20deb9..9706a95 100644 --- a/src/render_soft.c +++ b/src/render_soft.c @@ -93,6 +93,10 @@ DWORD WINAPI render_soft_main(void) static char debugText[512] = { 0 }; static double frameTime = 0; RECT debugrc = { 0, 0, ddraw->width, ddraw->height }; + + if (ddraw->primary && ddraw->primary->palette) + DrawText(ddraw->primary->hDC, debugText, -1, &debugrc, DT_NOCLIP); + tick_start = timeGetTime(); if (tick_start >= tick_fps) { @@ -106,10 +110,6 @@ DWORD WINAPI render_soft_main(void) CounterStart(); } - - if (ddraw->primary && ddraw->primary->palette) - DrawText(ddraw->primary->hDC, debugText, -1, &debugrc, DT_NOCLIP); - frame_count++; #endif