Fix could go something like this (unoptimized for size of course, feel free to trim):
NotFindMsg:
cmp uMsg, WM_SYSCOMMAND
jne NotWMSysCommand
mov eax, wParam
cmp eax, IDM_SAVE
je DoSaveFile
and eax, -16
cmp eax, SC_CLOSE
jne NotWMSysCommand
mov uMsg, WM_COMMAND
mov wParam, IDM_FILE_EXIT
jmp NotWMSysCommand
DoSaveFile:
call SaveFile
xor eax, eax
ret
@davepl
TinyRetroPad/trpad.asm
Line 2190 in 42f4c6c
Fix could go something like this (unoptimized for size of course, feel free to trim):
It would fix issues #15 and #24.