From f0d4f10d300383a18b545bea231182d7e0d8acbf Mon Sep 17 00:00:00 2001 From: grinvader <> Date: Wed, 22 Mar 2006 20:06:58 +0000 Subject: [PATCH] Fixed screen refresh for SDL software modes when toggling hq2x. Fixed a key repeating bug when changing resolutions. Can now choose screen mode with enter key. Some source cleanup. --- zsnes/src/gui/gui.asm | 17 +++++++++-------- zsnes/src/gui/guikeys.inc | 8 ++++++-- zsnes/src/gui/guimouse.inc | 30 +++++++++++++++++------------- 3 files changed, 32 insertions(+), 23 deletions(-) diff --git a/zsnes/src/gui/gui.asm b/zsnes/src/gui/gui.asm index 393b9f15..2bb3842c 100644 --- a/zsnes/src/gui/gui.asm +++ b/zsnes/src/gui/gui.asm @@ -1529,8 +1529,8 @@ guimencodermsg: ret SECTION .data -guimencodert1 db ' MENCODER IS MISSING : ',0 -guimencodert2 db ' PRESS SPACE TO CONTINUE',0 +guimencodert1 db ' MENCODER IS MISSING: ',0 +guimencodert2 db 'PRESS SPACE TO PROCEED',0 SECTION .text @@ -1730,17 +1730,18 @@ guiprevideo: mov ecx,256+128+64 .b cmp byte[pressed+ebx],0 - jne .pressedokay + jne .pressedkey inc ebx dec ecx jnz .b cmp byte[MouseDis],1 - je .mousedis + je .again call Get_MouseData test bx,01h jnz .pressedokay -.mousedis jmp .again +.pressedkey + mov byte[pressed+ebx],0 .pressedokay ret @@ -2251,16 +2252,16 @@ SECTION .text DisplayBoxes: ; Displays window when item is clicked xor esi,esi - mov byte[cwindrawn],0 .next2 mov al,[GUIwinorder+esi] cmp al,0 je .done - inc byte[cwindrawn] inc esi jmp .next2 .done - dec byte[cwindrawn] + mov eax,esi + dec eax + mov [cwindrawn],al xor eax,eax xor esi,esi .next diff --git a/zsnes/src/gui/guikeys.inc b/zsnes/src/gui/guikeys.inc index d6c56376..487a299b 100644 --- a/zsnes/src/gui/guikeys.inc +++ b/zsnes/src/gui/guikeys.inc @@ -150,8 +150,7 @@ SECTION .text GUIgetcurrentinput: mov byte[UseExtKey],0 - xor ch,ch - xor cl,cl + xor cx,cx .getnextkey call Check_Key or al,al @@ -1103,6 +1102,11 @@ GUIVideoKeys: mov [GUIcurrentvideoviewloc],ebx .posvd .nopagedown +; "Return" + cmp dl,13 + jne .noreturn + mov byte[GUICBHold],4 +.noreturn .notmodestab cmp dword[GUIVideoTabs],2 diff --git a/zsnes/src/gui/guimouse.inc b/zsnes/src/gui/guimouse.inc index b92c0a48..6e28a9eb 100644 --- a/zsnes/src/gui/guimouse.inc +++ b/zsnes/src/gui/guimouse.inc @@ -654,9 +654,9 @@ ProcessMouseButtons: jne .noAppend mov byte[GUICBHold],0 mov byte[GUIQuit],2 - pushad + ;pushad ;call MovieAppend - popad + ;popad ret .noAppend cmp byte[GUICBHold],34 ; dump raw @@ -1025,6 +1025,7 @@ GUIWinClicked: cmp ebx,21 je near DisplayGUISpeedClick ret + %macro GUIClickCButton 3 cmp eax,%1+1 jl %%noclick @@ -2488,6 +2489,9 @@ DisplayGUIVideoClick: jmp .nocheckboxhq .checkboxhq GUIClickCButtonHQ 115,163,byte[hqFilter] + pushad + call Clear2xSaIBuffer + popad .nocheckboxhq xor ebx,ebx mov bl,[cvidmode] @@ -2812,17 +2816,17 @@ guipresstestb: SECTION .data guipresstext3b db '(ESC TO SKIP)',0 guipresstext4b db 'FOR UP ',0 -db 'FOR DOWN ',0 -db 'FOR LEFT ',0 -db 'FOR RIGHT ',0 -db 'FOR START ',0 -db 'FOR SELECT ',0 -db 'FOR A (RIGHT BUTTON)',0 -db 'FOR B (DOWN BUTTON) ',0 -db 'FOR X (TOP BUTTON) ',0 -db 'FOR Y (LEFT BUTTON) ',0 -db 'FOR THE L BUTTON ',0 -db 'FOR THE R BUTTON ',0 + db 'FOR DOWN ',0 + db 'FOR LEFT ',0 + db 'FOR RIGHT ',0 + db 'FOR START ',0 + db 'FOR SELECT ',0 + db 'FOR A (RIGHT BUTTON)',0 + db 'FOR B (DOWN BUTTON) ',0 + db 'FOR X (TOP BUTTON) ',0 + db 'FOR Y (LEFT BUTTON) ',0 + db 'FOR THE L BUTTON ',0 + db 'FOR THE R BUTTON ',0 SECTION .bss guipressptr resd 1 guicpressptr resd 1