Fixed vsync in fullscreen mode

This commit is contained in:
pagefault
2001-05-31 02:45:42 +00:00
parent 2f383a9d1f
commit 5fe760f094

View File

@@ -159,21 +159,32 @@ extern "C" BYTE vsyncon;
void DrawScreen() void DrawScreen()
{ {
if(FullScreen == 1) if (vsyncon == 1)
{ {
DD_BackBuffer->Blt(NULL, DD_CFB, NULL, DDBLT_WAIT, NULL); if(FullScreen == 1)
DD_Primary->Flip(NULL, DDFLIP_WAIT); {
} DD_BackBuffer->Blt(NULL, DD_CFB, NULL, DDBLT_WAIT, NULL);
else DD_Primary->Flip(NULL, DDFLIP_WAIT);
{ }
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); }
else
{
if(FullScreen == 1)
{
DD_BackBuffer->Blt(NULL, DD_CFB, NULL, DDBLT_WAIT, NULL);
DD_Primary->Flip(NULL, DDFLIP_NOVSYNC);
}
else
{
DD_Primary->Blt(&rcWindow, DD_CFB, NULL, DDBLT_WAIT, NULL);
}
} }
} }