mirror of https://github.com/snes9xgit/snes9x.git
win32: default new cheat val to current cheat val, show error on empty
new val (#918)
This commit is contained in:
parent
87f050feba
commit
d62f14212e
|
@ -237,7 +237,7 @@ BEGIN
|
|||
END
|
||||
|
||||
IDD_CHEATER DIALOGEX 0, 0, 378, 189
|
||||
STYLE DS_SETFONT | DS_SETFOREGROUND | DS_3DLOOK | DS_FIXEDSYS | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_VISIBLE | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_SETFOREGROUND | DS_3DLOOK | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_VISIBLE | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "Cheat Entry and Editor"
|
||||
FONT 8, "MS Shell Dlg", 400, 0, 0x1
|
||||
BEGIN
|
||||
|
|
|
@ -10199,6 +10199,7 @@ INT_PTR CALLBACK DlgCheatSearchAdd(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lP
|
|||
memset(buf,0,sizeof(TCHAR) * 12);
|
||||
_stprintf(buf, TEXT("%u"), new_cheat->new_val);
|
||||
SetDlgItemText(hDlg, IDC_NC_CURRVAL, buf);
|
||||
SetDlgItemText(hDlg, IDC_NC_NEWVAL, buf);
|
||||
memset(buf,0,sizeof(TCHAR) * 12);
|
||||
_stprintf(buf, TEXT("%u"), new_cheat->saved_val);
|
||||
SetDlgItemText(hDlg, IDC_NC_PREVVAL, buf);
|
||||
|
@ -10380,6 +10381,11 @@ INT_PTR CALLBACK DlgCheatSearchAdd(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lP
|
|||
|
||||
ret=0;
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBox(hDlg, SEARCH_ERR_INVALIDNEWVALUE, SEARCH_TITLE_RANGEERROR, MB_OK);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
case IDCANCEL:
|
||||
|
|
Loading…
Reference in New Issue