MCPcopy Create free account
hub / github.com/TASEmulators/fceux / UpdateCheatListGroupBoxUI

Function UpdateCheatListGroupBoxUI

src/drivers/win/cheat.cpp:1063–1089  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1061}
1062
1063void UpdateCheatListGroupBoxUI()
1064{
1065 char temp[64];
1066 if (FrozenAddressCount < 256)
1067 {
1068 sprintf(temp, "Active Cheats %u", FrozenAddressCount);
1069 EnableWindow(GetDlgItem(hCheat, IDC_BTN_CHEAT_ADD), TRUE);
1070 EnableWindow(GetDlgItem(hCheat, IDC_BTN_CHEAT_ADDFROMFILE), TRUE);
1071 }
1072 else if (FrozenAddressCount == 256)
1073 {
1074 sprintf(temp, "Active Cheats %u (Max Limit)", FrozenAddressCount);
1075 EnableWindow(GetDlgItem(hCheat, IDC_BTN_CHEAT_ADD), FALSE);
1076 EnableWindow(GetDlgItem(hCheat, IDC_BTN_CHEAT_ADDFROMFILE), FALSE);
1077 }
1078 else
1079 {
1080 sprintf(temp, "%u Error: Too many cheats loaded!", FrozenAddressCount);
1081 EnableWindow(GetDlgItem(hCheat, IDC_BTN_CHEAT_ADD), FALSE);
1082 EnableWindow(GetDlgItem(hCheat, IDC_BTN_CHEAT_ADDFROMFILE), FALSE);
1083 }
1084 SetDlgItemText(hCheat, IDC_GROUPBOX_CHEATLIST, temp);
1085
1086 EnableWindow(GetDlgItem(hCheat, IDC_BTN_CHEAT_EXPORTTOFILE), cheats != 0);
1087
1088 CheckDlgButton(hCheat,IDC_CHEAT_GLOBAL_SWITCH,globalCheatDisabled?BST_UNCHECKED:BST_CHECKED);
1089}
1090
1091//Used by cheats and external dialogs such as hex editor to update items in the cheat search dialog
1092void UpdateCheatsAdded()

Callers 5

ToggleCheatsFunction · 0.85
CheatConsoleCallBFunction · 0.85
UpdateCheatsAddedFunction · 0.85
GGConvCallBFunction · 0.85
DisableAllCheatsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected