More bug fixes

This commit is contained in:
pagefault
2003-07-23 22:22:14 +00:00
parent 536620880b
commit 4622cfbc12

View File

@@ -271,29 +271,17 @@ void DDrawError(){
extern "C" BYTE vsyncon;
extern "C" BYTE KitchenSync;
extern "C" BYTE TripleBufferWin;
void DrawScreen()
{
if (FullScreen == 1)
{
if (TripleBufferWin == 1)
if (TripleBufferWin == 1 || KitchenSync == 1)
{
DD_BackBuffer->Blt(NULL, DD_CFB, &BlitArea, DDBLT_WAIT, NULL);
DD_Primary->Flip(NULL, DDFLIP_WAIT);
}
else
{
if (vsyncon == 1)
{
if (lpDD->WaitForVerticalBlank(DDWAITVB_BLOCKBEGIN, NULL) != DD_OK)
{
DDrawError();
}
}
DD_Primary->Blt(&rcWindow, DD_CFB, &BlitArea, DDBLT_WAIT, NULL);
}
if (KitchenSync == 1)
{
if (DD_BackBuffer->Blt(&rcWindow, DD_CFB, &BlitArea, DDBLT_WAIT, NULL) == DDERR_SURFACELOST)
@@ -302,6 +290,7 @@ void DrawScreen()
if (DD_Primary->Flip(NULL, DDFLIP_WAIT) == DDERR_SURFACELOST)
DD_Primary->Restore();
}
}
else
{
@@ -314,6 +303,19 @@ void DrawScreen()
}
DD_Primary->Blt(&rcWindow, DD_CFB, &BlitArea, DDBLT_WAIT, NULL);
}
}
else
{
if (vsyncon == 1)
{
if (lpDD->WaitForVerticalBlank(DDWAITVB_BLOCKBEGIN, NULL) != DD_OK)
{
DDrawError();
}
}
DD_Primary->Blt(&rcWindow, AltSurface == 0 ? DD_CFB : DD_CFB16, &BlitArea, DDBLT_WAIT, NULL);
}
}
DWORD InputEn=0;