Fixed vsync in fullscreen mode
This commit is contained in:
@@ -159,22 +159,33 @@ extern "C" BYTE vsyncon;
|
|||||||
|
|
||||||
void DrawScreen()
|
void DrawScreen()
|
||||||
{
|
{
|
||||||
|
if (vsyncon == 1)
|
||||||
|
{
|
||||||
if(FullScreen == 1)
|
if(FullScreen == 1)
|
||||||
{
|
{
|
||||||
DD_BackBuffer->Blt(NULL, DD_CFB, NULL, DDBLT_WAIT, NULL);
|
DD_BackBuffer->Blt(NULL, DD_CFB, NULL, DDBLT_WAIT, NULL);
|
||||||
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;
|
||||||
|
|||||||
Reference in New Issue
Block a user