diff --git a/zsnes/src/gui/gui.asm b/zsnes/src/gui/gui.asm index 0791c4fa..f9fa8db3 100644 --- a/zsnes/src/gui/gui.asm +++ b/zsnes/src/gui/gui.asm @@ -585,6 +585,8 @@ NEWSYM TripleBufferWin, db 0 NEWSYM ExclusiveSound, db 0 +NEWSYM OverlayEnabled, db 0 + GUIsave equ $-GUIRAdd NEWSYM CombinDataGlob, times 3300 db 0 ; 20-name, 42-combo, 2-key#, 1-P#, 1-ff @@ -602,9 +604,9 @@ ModemOKStat db 0 ; OK is detected on modem status ; LOAD STAT INPT OPT VID SND CHT NET GMKEY GUIOP ABT RSET SRC STCN MOVE CMBO ADDO GUIwinposxo dd 0,5 ,60 ,30 ,55 ,50 ,65 ,5 ,30 ,20 ,10 ,80 ,65 ,20 ,70 ,50 ,3 ,50 -GUIwinposyo dd 0,20 ,70 ,30 ,20 ,20 ,26 ,20 ,30 ,20 ,20 ,50 ,60 ,30 ,65 ,50 ,22 ,60 +GUIwinposyo dd 0,20 ,70 ,30 ,20 ,20 ,22 ,20 ,30 ,20 ,20 ,50 ,60 ,30 ,65 ,50 ,22 ,60 GUIwinsizex dd 0,244 ,126 ,189 ,167 ,170 ,148 ,244 ,8*16,13*16,240 ,7*16,9*16,8*16,9*16,140 ,250 ,160 -GUIwinsizey dd 0,190 ,3*16,166 ,190 ,192 ,178 ,191 ,40 ,189 ,192 ,98 ,42 ,40 ,42 ,70 ,190 ,60 +GUIwinsizey dd 0,190 ,3*16,166 ,190 ,196 ,184 ,191 ,40 ,189 ,192 ,98 ,42 ,40 ,42 ,70 ,190 ,60 GUIwinptr db 0 GUItextcolor db 0,0,0,0,0 diff --git a/zsnes/src/gui/guikeys.inc b/zsnes/src/gui/guikeys.inc index 31f3c186..ad1bce68 100644 --- a/zsnes/src/gui/guikeys.inc +++ b/zsnes/src/gui/guikeys.inc @@ -888,11 +888,12 @@ GUIOptionKeys: jne .nosavepath xor byte[DontSavePath],1 .nosavepath - cmp dh,'I' - jne .nospcdisable - xor byte[SPCDisable],1 -.nospcdisable %ifdef __WIN32__ + cmp dh,'Y' + jne .nooverlay + xor byte[OverlayEnabled],1 + call guimustrestartmsg +.nooverlay cmp dh,'S' jne .noalttimer xor byte[AlternateTimer],1 @@ -1026,6 +1027,10 @@ GUISoundKeys: xor byte[ExclusiveSound],1 .noexclusivesound %endif + cmp dh,'D' + jne .nospcdisable + xor byte[SPCDisable],1 +.nospcdisable ret .sampratenext db 1,4,5,6,2,3,0,0,0,0 diff --git a/zsnes/src/gui/guimouse.inc b/zsnes/src/gui/guimouse.inc index fda312ba..6ef4a5ae 100644 --- a/zsnes/src/gui/guimouse.inc +++ b/zsnes/src/gui/guimouse.inc @@ -2119,8 +2119,8 @@ DisplayGUIOptionClick: GUIClickCButton 11,146,byte[LatestSave] GUIClickCButton 11,156,byte[AutoState] GUIClickCButton 11,166,byte[DontSavePath] - GUIClickCButton 11,176,byte[SPCDisable] %ifdef __WIN32__ + GUIClickCButtonat 11,176,byte[OverlayEnabled] GUIClickCButtonat 11,186,byte[AlternateTimer] %endif ; Frameskip = 0 @@ -2252,6 +2252,7 @@ DisplayGUISoundClick: %ifdef __WIN32__ GUIClickCButton 11,171,byte[ExclusiveSound] %endif + GUIClickCButton 11,181,byte[SPCDisable] cmp eax,15 jl near .nosrate cmp edx,61 diff --git a/zsnes/src/gui/guiwindp.inc b/zsnes/src/gui/guiwindp.inc index 72f1ce22..e18c055d 100644 --- a/zsnes/src/gui/guiwindp.inc +++ b/zsnes/src/gui/guiwindp.inc @@ -1374,7 +1374,7 @@ DisplayGUIOption: GUIOuttextwin2u 4,26,151,GUIOptionTextH,9 GUIOuttextwin2u 4,26,161,GUIOptionTextI,15 GUIOuttextwin2u 4,26,171,GUIOptionTextJ,0 - GUIOuttextwin2u 4,26,181,GUIOptionTextK,1 + GUIOuttextwin2u 4,26,181,GUIOptionTextK,6 add byte[GUItextcolor],15 GUIOuttextwin2 4,5,15,[GUITemp] GUIOuttextwin2 4,25,30,GUIOptionText2 @@ -1505,7 +1505,7 @@ DisplayGUIOption: .nocheckbox13 GUIDisplayIconWin 4,11,166,[GUITemp] mov dword[GUITemp],GUIIconDataCheckBoxUC - cmp byte[SPCDisable],0 + cmp byte[OverlayEnabled],0 je .nocheckbox14 mov dword[GUITemp],GUIIconDataCheckBoxC .nocheckbox14 @@ -1580,7 +1580,7 @@ GUIOptionTextG db 'OLD GFX MODE 2',0 GUIOptionTextH db 'START AT LATEST SAVE',0 GUIOptionTextI db 'AUTO STATE SAVE/LOAD',0 GUIOptionTextJ db 'DON',39,'T SAVE CURRENT PATH',0 -GUIOptionTextK db 'DISABLE SOUND CPU EMU',0 +GUIOptionTextK db 'OVERLAY SUPPORT',0 GUIOptionTextL db 'USE ALTERNATE TIMER',0 GUIOptionText8 db '-',0 GUIOptionText9 db '+',0 @@ -2142,6 +2142,7 @@ DisplayGUISound: GUIOuttextwin2u 6,26,166,GUISoundTextM,0 %ifdef __WIN32__ GUIOuttextwin2u 6,26,176,GUISoundTextN,1 + GUIOuttextwin2u 6,26,186,GUISoundTextO,0 %endif add byte[GUItextcolor],15 GUIOuttextwin2 6,25,25,GUISoundText1 @@ -2169,6 +2170,7 @@ DisplayGUISound: GUIOuttextwin2 6,25,165,GUISoundTextM %ifdef __WIN32__ GUIOuttextwin2 6,25,175,GUISoundTextN + GUIOuttextwin2 6,25,185,GUISoundTextO %endif mov al,[GUIWincol] mov byte[GUItextcolor],al @@ -2268,6 +2270,12 @@ DisplayGUISound: mov dword[GUITemp],GUIIconDataCheckBoxC .nocheckbox9 GUIDisplayIconWin 6,11,171,[GUITemp] + mov dword[GUITemp],GUIIconDataCheckBoxUC + cmp byte[OverlayEnabled],0 + je .nocheckbox10 + mov dword[GUITemp],GUIIconDataCheckBoxC +.nocheckbox10 + GUIDisplayIconWin 6,11,181,[GUITemp] %endif DrawGUIWinBox 6,15,61,69,69,167 mov dword[GUITemp],GUISoundText7 @@ -2360,6 +2368,7 @@ GUISoundTextK db 'LOW PASS FILTER',0 GUISoundTextL db 'SOUND BUFFERING',0 GUISoundTextM db 'CUBIC SPLINE INTERP',0 GUISoundTextN db 'EXCLUSIVE MODE',0 +GUISoundTextO db 'DISABLE SPC EMU',0 DisplayGUICheatConv: mov eax,[ccheatnpos] diff --git a/zsnes/src/win/winlink.cpp b/zsnes/src/win/winlink.cpp index 99530abf..109eb88d 100644 --- a/zsnes/src/win/winlink.cpp +++ b/zsnes/src/win/winlink.cpp @@ -44,7 +44,6 @@ DWORD FirstSound=1; int AllowDefault=0; int SoundEnabled=1; -BYTE OverlayEnabled = 0; DWORD Overlay = 0; DWORD Overlay_failed = 0; DWORD Overlay_Colorkey = 0; @@ -162,6 +161,7 @@ void DDrawError(){ extern "C" BYTE vsyncon; extern "C" BYTE TripleBufferWin; +extern "C" BYTE OverlayEnabled; void DrawScreen() {