Fixed garbled screen after VSync or Trible Buffering is enabled.

This commit is contained in:
jbo_85
2006-02-16 22:47:06 +00:00
parent dddf2e25fa
commit 8f626ac7d6
2 changed files with 21 additions and 13 deletions

View File

@@ -768,8 +768,7 @@ GUIOptionKeys:
.nousepl34 .nousepl34
%ifdef __MSDOS__ %ifdef __MSDOS__
GUIKeyCheckbox SidewinderFix,'I' GUIKeyCheckbox SidewinderFix,'I'
%endif %elifdef __WIN32__
%ifdef __WIN32__
GUIKeyCheckbox HighPriority,'H' GUIKeyCheckbox HighPriority,'H'
%endif %endif
GUIKeyCheckbox FPSAtStart,'F' GUIKeyCheckbox FPSAtStart,'F'
@@ -1147,9 +1146,11 @@ GUIVideoKeys:
; mov byte[vsyncon],0 ; mov byte[vsyncon],0
; mov byte[cfgvsync],0 ; mov byte[cfgvsync],0
call initDirectDraw call initDirectDraw
pushad
call Clear2xSaIBuffer
popad
.notriplebufferwin .notriplebufferwin
%endif %elifdef __MSDOS__
%ifdef __MSDOS__
cmp dh,'T' cmp dh,'T'
jne .notriplebuffer jne .notriplebuffer
xor ebx,ebx xor ebx,ebx
@@ -1173,6 +1174,9 @@ GUIVideoKeys:
mov [cfgvsync],al mov [cfgvsync],al
%ifdef __WIN32__ %ifdef __WIN32__
call initDirectDraw call initDirectDraw
pushad
call Clear2xSaIBuffer
popad
%endif %endif
%ifdef __MSDOS__ %ifdef __MSDOS__
; mov byte[Triplebufen],0 ; mov byte[Triplebufen],0

View File

@@ -2400,8 +2400,10 @@ DisplayGUIVideoClick:
GUIClickCButton 11,183,byte[GrayscaleMode] GUIClickCButton 11,183,byte[GrayscaleMode]
%ifdef __WIN32__ %ifdef __WIN32__
GUIClickCButtonf 115,183,byte[vsyncon],initDirectDraw GUIClickCButtonf 115,183,byte[vsyncon],initDirectDraw
%endif pushad
%ifdef __MSDOS__ call Clear2xSaIBuffer
popad
%elifdef __MSDOS__
GUIClickCButtonT 115,183,byte[vsyncon],byte[Triplebufen] GUIClickCButtonT 115,183,byte[vsyncon],byte[Triplebufen]
%endif %endif
xor ebx,ebx xor ebx,ebx
@@ -2423,11 +2425,14 @@ DisplayGUIVideoClick:
%endif %endif
.nohsline .nohsline
%ifdef __WIN32__ %ifdef __WIN32__
xor ebx,ebx xor ebx,ebx
mov bl,[cvidmode] mov bl,[cvidmode]
cmp byte[GUITBWVID+ebx],0 cmp byte[GUITBWVID+ebx],0
je near .notriplebufferwin je near .notriplebufferwin
GUIClickCButtonf 11,123,byte[TripleBufferWin],initDirectDraw GUIClickCButtonf 11,123,byte[TripleBufferWin],initDirectDraw
pushad
call Clear2xSaIBuffer
popad
.notriplebufferwin .notriplebufferwin
%endif %endif
xor ebx,ebx xor ebx,ebx
@@ -2518,8 +2523,7 @@ DisplayGUISoundClick:
GUIClickCButton5 111,173,byte[LowPassFilterType],2 GUIClickCButton5 111,173,byte[LowPassFilterType],2
%ifndef __MSDOS__ %ifndef __MSDOS__
GUIClickCButton5MMXC 111,183,byte[LowPassFilterType],3 GUIClickCButton5MMXC 111,183,byte[LowPassFilterType],3
%endif %elifdef __WIN32__
%ifdef __WIN32__
GUIClickCButton 11,101,byte[PrimaryBuffer] GUIClickCButton 11,101,byte[PrimaryBuffer]
%endif %endif
cmp eax,15 cmp eax,15