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

@@ -158,6 +158,8 @@ void DDrawError(){
extern "C" BYTE vsyncon; extern "C" BYTE vsyncon;
void DrawScreen() void DrawScreen()
{
if (vsyncon == 1)
{ {
if(FullScreen == 1) if(FullScreen == 1)
{ {
@@ -165,17 +167,26 @@ void DrawScreen()
DD_Primary->Flip(NULL, DDFLIP_WAIT); DD_Primary->Flip(NULL, DDFLIP_WAIT);
} }
else else
{
if (vsyncon == 1)
{ {
if(lpDD->WaitForVerticalBlank(DDWAITVB_BLOCKBEGIN, NULL) != DD_OK) if(lpDD->WaitForVerticalBlank(DDWAITVB_BLOCKBEGIN, NULL) != DD_OK)
{ {
DDrawError(); DDrawError();
} }
} }
}
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); DD_Primary->Blt(&rcWindow, DD_CFB, NULL, DDBLT_WAIT, NULL);
} }
} }
}
DWORD InputEn=0; DWORD InputEn=0;