Skip to content

Commit

Permalink
Revert "some changes to gdi frameskip"
Browse files Browse the repository at this point in the history
This reverts commit ff9bdea.
  • Loading branch information
FunkyFr3sh committed Nov 20, 2018
1 parent ff9bdea commit 5829453
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/render_soft.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,19 +55,19 @@ DWORD WINAPI render_soft_main(void)

while (ddraw->render.run && WaitForSingleObject(ddraw->render.sem, INFINITE) != WAIT_FAILED)
{
BOOL skipFrame = FALSE;

if (maxFPS > 0)
{
DWORD curTick = timeGetTime();
if (lastTick + frameLength > curTick)
skipFrame = TRUE;
else
lastTick = curTick;
{
SetEvent(ddraw->render.ev);
continue;
}
lastTick = curTick;
}

#if _DEBUG
if (!skipFrame) DrawFrameInfoStart();
DrawFrameInfoStart();
#endif

EnterCriticalSection(&ddraw->cs);
Expand Down Expand Up @@ -113,7 +113,7 @@ DWORD WINAPI render_soft_main(void)
DIB_RGB_COLORS,
SRCCOPY);
}
else if (!skipFrame && !ChildWindowExists && (ddraw->render.width != ddraw->width || ddraw->render.height != ddraw->height))
else if (!ChildWindowExists && (ddraw->render.width != ddraw->width || ddraw->render.height != ddraw->height))
{
StretchDIBits(
ddraw->render.hDC,
Expand All @@ -130,7 +130,7 @@ DWORD WINAPI render_soft_main(void)
DIB_RGB_COLORS,
SRCCOPY);
}
else if (!skipFrame || ChildWindowExists)
else
{
SetDIBitsToDevice(
ddraw->render.hDC,
Expand All @@ -151,7 +151,7 @@ DWORD WINAPI render_soft_main(void)
LeaveCriticalSection(&ddraw->cs);

#if _DEBUG
if (!skipFrame) DrawFrameInfoEnd();
DrawFrameInfoEnd();
#endif

SetEvent(ddraw->render.ev);
Expand Down

0 comments on commit 5829453

Please sign in to comment.