Added triple buffering to GUI

This commit is contained in:
pagefault
2001-06-01 01:52:21 +00:00
parent 87ef7a41bb
commit 1e4c887933
2 changed files with 20 additions and 5 deletions

View File

@@ -1298,7 +1298,7 @@ NEWSYM GUIWFVID, db 0,0,0,1,0,0,0,1,1,1,0,0,1,1,0,0,1,1,0,0,0,0 ; If Windo
NEWSYM GUIDSIZE, db 0,0,0,0,0,1,0,1,1,0,0,1,0,1,0,1,0,1,0,1,0,1
NEWSYM GUIRATIO, db 0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
NEWSYM GUIBIFIL, db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
NEWSYM GUITBWVID, db 0,0,0,0,0,1,0,1,1,0,0,1,0,1,0,1,0,1,0,1,0,1 ; Triple Buffering (Win)
NEWSYM GUITBWVID, db 0,0,0,1,0,1,0,1,1,1,0,1,1,1,0,1,1,1,0,1,0,1 ; Triple Buffering (Win)
SECTION .text
; ****************************

View File

@@ -155,17 +155,25 @@ void DDrawError(){
}
extern "C" BYTE vsyncon;
extern "C" BYTE TripleBufferWin;
void DrawScreen()
{
if (vsyncon == 1)
{
if(FullScreen == 1)
{
if(TripleBufferWin == 1)
{
DD_BackBuffer->Blt(NULL, DD_CFB, NULL, DDBLT_WAIT, NULL);
DD_Primary->Flip(NULL, DDFLIP_WAIT);
}
else
{
DD_Primary->Blt(&rcWindow, DD_CFB, NULL, DDBLT_WAIT, NULL);
}
}
else
{
if(lpDD->WaitForVerticalBlank(DDWAITVB_BLOCKBEGIN, NULL) != DD_OK)
{
@@ -177,6 +185,8 @@ void DrawScreen()
else
{
if(FullScreen == 1)
{
if(TripleBufferWin == 1)
{
DD_BackBuffer->Blt(NULL, DD_CFB, NULL, DDBLT_WAIT, NULL);
DD_Primary->Flip(NULL, DDFLIP_NOVSYNC);
@@ -186,6 +196,11 @@ void DrawScreen()
DD_Primary->Blt(&rcWindow, DD_CFB, NULL, DDBLT_WAIT, NULL);
}
}
else
{
DD_Primary->Blt(&rcWindow, DD_CFB, NULL, DDBLT_WAIT, NULL);
}
}
}
DWORD InputEn=0;