From 8f626ac7d673c5e459c18dd96fd934277f44528e Mon Sep 17 00:00:00 2001 From: jbo_85 <> Date: Thu, 16 Feb 2006 22:47:06 +0000 Subject: [PATCH] Fixed garbled screen after VSync or Trible Buffering is enabled. --- zsnes/src/gui/guikeys.inc | 12 ++++++++---- zsnes/src/gui/guimouse.inc | 22 +++++++++++++--------- 2 files changed, 21 insertions(+), 13 deletions(-) diff --git a/zsnes/src/gui/guikeys.inc b/zsnes/src/gui/guikeys.inc index fece8626..0f5c2e8f 100644 --- a/zsnes/src/gui/guikeys.inc +++ b/zsnes/src/gui/guikeys.inc @@ -768,8 +768,7 @@ GUIOptionKeys: .nousepl34 %ifdef __MSDOS__ GUIKeyCheckbox SidewinderFix,'I' -%endif -%ifdef __WIN32__ +%elifdef __WIN32__ GUIKeyCheckbox HighPriority,'H' %endif GUIKeyCheckbox FPSAtStart,'F' @@ -1147,9 +1146,11 @@ GUIVideoKeys: ; mov byte[vsyncon],0 ; mov byte[cfgvsync],0 call initDirectDraw + pushad + call Clear2xSaIBuffer + popad .notriplebufferwin -%endif -%ifdef __MSDOS__ +%elifdef __MSDOS__ cmp dh,'T' jne .notriplebuffer xor ebx,ebx @@ -1173,6 +1174,9 @@ GUIVideoKeys: mov [cfgvsync],al %ifdef __WIN32__ call initDirectDraw + pushad + call Clear2xSaIBuffer + popad %endif %ifdef __MSDOS__ ; mov byte[Triplebufen],0 diff --git a/zsnes/src/gui/guimouse.inc b/zsnes/src/gui/guimouse.inc index de96f286..68a83ca6 100644 --- a/zsnes/src/gui/guimouse.inc +++ b/zsnes/src/gui/guimouse.inc @@ -2400,8 +2400,10 @@ DisplayGUIVideoClick: GUIClickCButton 11,183,byte[GrayscaleMode] %ifdef __WIN32__ GUIClickCButtonf 115,183,byte[vsyncon],initDirectDraw -%endif -%ifdef __MSDOS__ + pushad + call Clear2xSaIBuffer + popad +%elifdef __MSDOS__ GUIClickCButtonT 115,183,byte[vsyncon],byte[Triplebufen] %endif xor ebx,ebx @@ -2423,11 +2425,14 @@ DisplayGUIVideoClick: %endif .nohsline %ifdef __WIN32__ - xor ebx,ebx - mov bl,[cvidmode] - cmp byte[GUITBWVID+ebx],0 - je near .notriplebufferwin - GUIClickCButtonf 11,123,byte[TripleBufferWin],initDirectDraw + xor ebx,ebx + mov bl,[cvidmode] + cmp byte[GUITBWVID+ebx],0 + je near .notriplebufferwin + GUIClickCButtonf 11,123,byte[TripleBufferWin],initDirectDraw + pushad + call Clear2xSaIBuffer + popad .notriplebufferwin %endif xor ebx,ebx @@ -2518,8 +2523,7 @@ DisplayGUISoundClick: GUIClickCButton5 111,173,byte[LowPassFilterType],2 %ifndef __MSDOS__ GUIClickCButton5MMXC 111,183,byte[LowPassFilterType],3 -%endif -%ifdef __WIN32__ +%elifdef __WIN32__ GUIClickCButton 11,101,byte[PrimaryBuffer] %endif cmp eax,15