1
0
mirror of https://github.com/FunkyFr3sh/cnc-ddraw.git synced 2025-03-24 17:49:52 +01:00

call DrawText before CounterStart

This commit is contained in:
FunkyFr3sh 2018-07-05 19:41:48 +02:00
parent 42fb8577a4
commit 2e6a264738
2 changed files with 8 additions and 8 deletions

View File

@ -421,6 +421,10 @@ DWORD WINAPI render_main(void)
static char debugText[512] = { 0 }; static char debugText[512] = { 0 };
static double frameTime = 0; static double frameTime = 0;
RECT debugrc = { 0, 0, ddraw->width, ddraw->height }; 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(); tick_start = timeGetTime();
if (tick_start >= tick_fps) if (tick_start >= tick_fps)
{ {
@ -434,10 +438,6 @@ DWORD WINAPI render_main(void)
CounterStart(); CounterStart();
} }
if (ddraw->primary && ddraw->primary->palette)
DrawText(ddraw->primary->hDC, debugText, -1, &debugrc, DT_NOCLIP);
frame_count++; frame_count++;
#endif #endif

View File

@ -93,6 +93,10 @@ DWORD WINAPI render_soft_main(void)
static char debugText[512] = { 0 }; static char debugText[512] = { 0 };
static double frameTime = 0; static double frameTime = 0;
RECT debugrc = { 0, 0, ddraw->width, ddraw->height }; 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(); tick_start = timeGetTime();
if (tick_start >= tick_fps) if (tick_start >= tick_fps)
{ {
@ -106,10 +110,6 @@ DWORD WINAPI render_soft_main(void)
CounterStart(); CounterStart();
} }
if (ddraw->primary && ddraw->primary->palette)
DrawText(ddraw->primary->hDC, debugText, -1, &debugrc, DT_NOCLIP);
frame_count++; frame_count++;
#endif #endif