mirror of
https://github.com/FunkyFr3sh/cnc-ddraw.git
synced 2025-03-24 17:49:52 +01:00
Revert "some changes to gdi frameskip"
This reverts commit ff9bdeaf40ecb0d083f26a885ef4704a05d738ba.
This commit is contained in:
parent
ff9bdeaf40
commit
5829453a1a
@ -55,19 +55,19 @@ DWORD WINAPI render_soft_main(void)
|
|||||||
|
|
||||||
while (ddraw->render.run && WaitForSingleObject(ddraw->render.sem, INFINITE) != WAIT_FAILED)
|
while (ddraw->render.run && WaitForSingleObject(ddraw->render.sem, INFINITE) != WAIT_FAILED)
|
||||||
{
|
{
|
||||||
BOOL skipFrame = FALSE;
|
|
||||||
|
|
||||||
if (maxFPS > 0)
|
if (maxFPS > 0)
|
||||||
{
|
{
|
||||||
DWORD curTick = timeGetTime();
|
DWORD curTick = timeGetTime();
|
||||||
if (lastTick + frameLength > curTick)
|
if (lastTick + frameLength > curTick)
|
||||||
skipFrame = TRUE;
|
{
|
||||||
else
|
SetEvent(ddraw->render.ev);
|
||||||
lastTick = curTick;
|
continue;
|
||||||
|
}
|
||||||
|
lastTick = curTick;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if _DEBUG
|
#if _DEBUG
|
||||||
if (!skipFrame) DrawFrameInfoStart();
|
DrawFrameInfoStart();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
EnterCriticalSection(&ddraw->cs);
|
EnterCriticalSection(&ddraw->cs);
|
||||||
@ -113,7 +113,7 @@ DWORD WINAPI render_soft_main(void)
|
|||||||
DIB_RGB_COLORS,
|
DIB_RGB_COLORS,
|
||||||
SRCCOPY);
|
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(
|
StretchDIBits(
|
||||||
ddraw->render.hDC,
|
ddraw->render.hDC,
|
||||||
@ -130,7 +130,7 @@ DWORD WINAPI render_soft_main(void)
|
|||||||
DIB_RGB_COLORS,
|
DIB_RGB_COLORS,
|
||||||
SRCCOPY);
|
SRCCOPY);
|
||||||
}
|
}
|
||||||
else if (!skipFrame || ChildWindowExists)
|
else
|
||||||
{
|
{
|
||||||
SetDIBitsToDevice(
|
SetDIBitsToDevice(
|
||||||
ddraw->render.hDC,
|
ddraw->render.hDC,
|
||||||
@ -151,7 +151,7 @@ DWORD WINAPI render_soft_main(void)
|
|||||||
LeaveCriticalSection(&ddraw->cs);
|
LeaveCriticalSection(&ddraw->cs);
|
||||||
|
|
||||||
#if _DEBUG
|
#if _DEBUG
|
||||||
if (!skipFrame) DrawFrameInfoEnd();
|
DrawFrameInfoEnd();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
SetEvent(ddraw->render.ev);
|
SetEvent(ddraw->render.ev);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user