Forced vsync in triple buffering mode

This commit is contained in:
pagefault
2001-06-01 19:42:26 +00:00
parent 02d5976899
commit 9d2d6d7b97

View File

@@ -159,8 +159,6 @@ extern "C" BYTE TripleBufferWin;
void DrawScreen() void DrawScreen()
{ {
if (vsyncon == 1)
{
if (FullScreen == 1) if (FullScreen == 1)
{ {
if (TripleBufferWin == 1) if (TripleBufferWin == 1)
@@ -170,37 +168,27 @@ void DrawScreen()
} }
else else
{ {
DD_Primary->Blt(&rcWindow, DD_CFB, NULL, DDBLT_WAIT, NULL); if (vsyncon == 1)
}
}
else
{ {
if (lpDD->WaitForVerticalBlank(DDWAITVB_BLOCKBEGIN, NULL) != DD_OK) if (lpDD->WaitForVerticalBlank(DDWAITVB_BLOCKBEGIN, NULL) != DD_OK)
{ {
DDrawError(); DDrawError();
} }
}
DD_Primary->Blt(&rcWindow, DD_CFB, NULL, DDBLT_WAIT, NULL); DD_Primary->Blt(&rcWindow, DD_CFB, NULL, DDBLT_WAIT, NULL);
} }
} }
else else
{ {
if (FullScreen == 1) if (vsyncon == 1)
{ {
if (TripleBufferWin == 1) if (lpDD->WaitForVerticalBlank(DDWAITVB_BLOCKBEGIN, NULL) != DD_OK)
{ {
DD_BackBuffer->Blt(NULL, DD_CFB, NULL, DDBLT_WAIT, NULL); DDrawError();
DD_Primary->Flip(NULL, DDFLIP_NOVSYNC); }
} }
else
{
DD_Primary->Blt(&rcWindow, DD_CFB, NULL, DDBLT_WAIT, NULL); DD_Primary->Blt(&rcWindow, DD_CFB, NULL, DDBLT_WAIT, NULL);
} }
}
else
{
DD_Primary->Blt(&rcWindow, DD_CFB, NULL, DDBLT_WAIT, NULL);
}
}
} }
DWORD InputEn=0; DWORD InputEn=0;