1. Fix freeze ram in Hex Editor doesn't refresh the related window.
2. detail
This commit is contained in:
parent
9adcbf16cb
commit
885bc1e889
|
@ -459,7 +459,7 @@ BOOL CALLBACK CheatConsoleCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM l
|
|||
|
||||
tmpsel = SendDlgItemMessage(hwndDlg, IDC_LIST_CHEATS, LVM_GETNEXTITEM, tmpsel, LVNI_ALL | LVNI_SELECTED);
|
||||
}
|
||||
UpdateCheatWindowRelatedWindow();
|
||||
UpdateCheatRelatedWindow();
|
||||
UpdateCheatListGroupBoxUI();
|
||||
}
|
||||
break;
|
||||
|
@ -496,7 +496,7 @@ BOOL CALLBACK CheatConsoleCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM l
|
|||
selcheat = newselcheat;
|
||||
}
|
||||
|
||||
UpdateCheatWindowRelatedWindow();
|
||||
UpdateCheatRelatedWindow();
|
||||
UpdateCheatListGroupBoxUI();
|
||||
}
|
||||
}
|
||||
|
@ -581,7 +581,7 @@ BOOL CALLBACK CheatConsoleCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM l
|
|||
|
||||
ClearCheatListText(hwndDlg);
|
||||
}
|
||||
UpdateCheatWindowRelatedWindow();
|
||||
UpdateCheatRelatedWindow();
|
||||
UpdateCheatListGroupBoxUI();
|
||||
break;
|
||||
}
|
||||
|
@ -606,7 +606,7 @@ BOOL CALLBACK CheatConsoleCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM l
|
|||
|
||||
ClearCheatListText(hwndDlg);
|
||||
|
||||
UpdateCheatWindowRelatedWindow();
|
||||
UpdateCheatRelatedWindow();
|
||||
UpdateCheatListGroupBoxUI();
|
||||
}
|
||||
} else {
|
||||
|
@ -616,7 +616,7 @@ BOOL CALLBACK CheatConsoleCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM l
|
|||
selcheat = -1;
|
||||
ClearCheatListText(hwndDlg);
|
||||
}
|
||||
UpdateCheatWindowRelatedWindow();
|
||||
UpdateCheatRelatedWindow();
|
||||
UpdateCheatListGroupBoxUI();
|
||||
}
|
||||
break;
|
||||
|
@ -661,7 +661,7 @@ BOOL CALLBACK CheatConsoleCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM l
|
|||
SetDlgItemText(hwndDlg, IDC_CHEAT_COM, (LPTSTR)"");
|
||||
else
|
||||
SetDlgItemText(hwndDlg, IDC_CHEAT_COM, (LPTSTR)U8ToStr(c));
|
||||
UpdateCheatWindowRelatedWindow();
|
||||
UpdateCheatRelatedWindow();
|
||||
UpdateCheatListGroupBoxUI();
|
||||
// UpdateCheatAdded();
|
||||
break;
|
||||
|
@ -690,8 +690,8 @@ BOOL CALLBACK CheatConsoleCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM l
|
|||
if (file)
|
||||
{
|
||||
FCEU_LoadGameCheats(file, 0);
|
||||
UpdateCheatWindowRelatedWindow();
|
||||
UpdateCheatsAdded();
|
||||
UpdateCheatRelatedWindow();
|
||||
savecheats = 1;
|
||||
}
|
||||
}
|
||||
|
@ -801,7 +801,7 @@ BOOL CALLBACK CheatConsoleCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM l
|
|||
{
|
||||
FCEUI_SetCheat(tmpsel, name, -1, -1, -2, s ^= 1, 1);
|
||||
|
||||
UpdateCheatWindowRelatedWindow();
|
||||
UpdateCheatRelatedWindow();
|
||||
UpdateCheatListGroupBoxUI();
|
||||
}
|
||||
}
|
||||
|
@ -816,7 +816,7 @@ BOOL CALLBACK CheatConsoleCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM l
|
|||
{
|
||||
FCEUI_SetCheat(tmpsel, name, -1, -1, -2, s ^= 1, 1);
|
||||
|
||||
UpdateCheatWindowRelatedWindow();
|
||||
UpdateCheatRelatedWindow();
|
||||
UpdateCheatListGroupBoxUI();
|
||||
}
|
||||
}
|
||||
|
@ -907,6 +907,7 @@ void ConfigCheats(HWND hParent)
|
|||
else
|
||||
DialogBox(fceu_hInstance, "CHEATCONSOLE", hParent, CheatConsoleCallB);
|
||||
UpdateCheatsAdded();
|
||||
UpdateCheatRelatedWindow();
|
||||
} else
|
||||
{
|
||||
ShowWindow(hCheat, SW_SHOWNORMAL);
|
||||
|
@ -1063,7 +1064,7 @@ BOOL CALLBACK GGConvCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
|||
EnableWindow(GetDlgItem(hCheat, IDC_BTN_CHEAT_DEL), TRUE);
|
||||
EnableWindow(GetDlgItem(hCheat, IDC_BTN_CHEAT_UPD), TRUE);
|
||||
|
||||
UpdateCheatWindowRelatedWindow();
|
||||
UpdateCheatRelatedWindow();
|
||||
UpdateCheatListGroupBoxUI();
|
||||
}
|
||||
}
|
||||
|
@ -1205,7 +1206,7 @@ void DisableAllCheats()
|
|||
}
|
||||
}
|
||||
|
||||
void UpdateCheatWindowRelatedWindow()
|
||||
void UpdateCheatRelatedWindow()
|
||||
{
|
||||
// hex editor
|
||||
if (hMemView)
|
||||
|
|
|
@ -22,7 +22,7 @@ extern std::vector<uint16> FrozenAddresses;
|
|||
|
||||
void DisableAllCheats();
|
||||
|
||||
void UpdateCheatWindowRelatedWindow();
|
||||
void UpdateCheatRelatedWindow();
|
||||
|
||||
// deselect the old one and select the new one
|
||||
#define ListView_MoveSelectionMark(hwnd, prevIndex, newIndex) \
|
||||
|
|
|
@ -951,6 +951,7 @@ void FreezeRam(int address, int mode, int final){
|
|||
//}
|
||||
|
||||
UpdateCheatsAdded();
|
||||
UpdateCheatRelatedWindow();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1819,22 +1819,23 @@ LRESULT CALLBACK RamSearchProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lPara
|
|||
// Don't open cheat dialog
|
||||
|
||||
switch (sizeType) {
|
||||
case 0: {
|
||||
FCEUI_AddCheat("",address,curvalue,-1,1);
|
||||
break; }
|
||||
case 1: {
|
||||
case 0:
|
||||
FCEUI_AddCheat("",address,curvalue, -1, 1);
|
||||
break;
|
||||
case 1:
|
||||
FCEUI_AddCheat("",address,curvalue & 0xFF, -1, 1);
|
||||
FCEUI_AddCheat("",address + 1,(curvalue & 0xFF00) / 0x100, -1, 1);
|
||||
break;
|
||||
case 2:
|
||||
FCEUI_AddCheat("",address,curvalue & 0xFF,-1,1);
|
||||
FCEUI_AddCheat("",address + 1,(curvalue & 0xFF00) / 0x100,-1,1);
|
||||
break; }
|
||||
case 2: {
|
||||
FCEUI_AddCheat("",address,curvalue & 0xFF,-1,1);
|
||||
FCEUI_AddCheat("",address + 1,(curvalue & 0xFF00) / 0x100,-1,1);
|
||||
FCEUI_AddCheat("",address + 2,(curvalue & 0xFF0000) / 0x10000,-1,1);
|
||||
FCEUI_AddCheat("",address + 3,(curvalue & 0xFF000000) / 0x1000000,-1,1);
|
||||
break; }
|
||||
FCEUI_AddCheat("",address + 1,(curvalue & 0xFF00) / 0x100, -1, 1);
|
||||
FCEUI_AddCheat("",address + 2,(curvalue & 0xFF0000) / 0x10000, -1, 1);
|
||||
FCEUI_AddCheat("",address + 3,(curvalue & 0xFF000000) / 0x1000000, -1, 1);
|
||||
break;
|
||||
}
|
||||
|
||||
UpdateCheatsAdded();
|
||||
UpdateCheatRelatedWindow();
|
||||
|
||||
watchItemIndex = ListView_GetNextItem(ramListControl, watchItemIndex, LVNI_SELECTED);
|
||||
|
||||
|
|
|
@ -1442,8 +1442,10 @@ LRESULT CALLBACK RamWatchProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam
|
|||
FCEUI_AddCheat("", address + 3, (rswatches[watchIndex].CurValue & 0xFF000000) / 0x1000000, -1, 1);
|
||||
break;
|
||||
}
|
||||
|
||||
UpdateCheatsAdded();
|
||||
UpdateCheatWindowRelatedWindow();
|
||||
|
||||
}
|
||||
else
|
||||
MessageBox(hDlg, "Sorry, you can't add cheat to a separator.", "Ram Watch", MB_ICONERROR | MB_OK);
|
||||
|
|
|
@ -731,8 +731,8 @@ BOOL CALLBACK ReplayDialogProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lP
|
|||
case IDYES:
|
||||
extern void DisableAllCheats();
|
||||
DisableAllCheats();
|
||||
extern void UpdateCheatWindowRelatedWindow();
|
||||
UpdateCheatWindowRelatedWindow();
|
||||
extern void UpdateCheatRelatedWindow();
|
||||
UpdateCheatRelatedWindow();
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -969,8 +969,8 @@ static BOOL CALLBACK RecordDialogProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LP
|
|||
case IDYES:
|
||||
extern void DisableAllCheats();
|
||||
DisableAllCheats();
|
||||
extern void UpdateCheatWindowRelatedWindow();
|
||||
UpdateCheatWindowRelatedWindow();
|
||||
extern void UpdateCheatRelatedWindow();
|
||||
UpdateCheatRelatedWindow();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -556,7 +556,11 @@ FCEUGI *FCEUI_LoadGameVirtual(const char *name, int OverwriteVidMode, bool silen
|
|||
DoDebuggerDataReload(); // Reloads data without reopening window
|
||||
CDLoggerROMChanged();
|
||||
if (hMemView) UpdateColorTable();
|
||||
if (hCheat) UpdateCheatsAdded();
|
||||
if (hCheat)
|
||||
{
|
||||
UpdateCheatsAdded();
|
||||
UpdateCheatRelatedWindow();
|
||||
}
|
||||
if (FrozenAddressCount)
|
||||
FCEU_DispMessage("%d cheats active", 0, FrozenAddressCount);
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue