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

Function RedoCheatsCallB

src/drivers/win/cheat.cpp:111–136  ·  view source on GitHub ↗

int RedoCheatsCallB(char *name, uint32 a, uint8 v, int s) { //bbit edited: this commented out line was changed to the below for the new fceud

Source from the content-addressed store, hash-verified

109
110//int RedoCheatsCallB(char *name, uint32 a, uint8 v, int s) { //bbit edited: this commented out line was changed to the below for the new fceud
111int RedoCheatsCallB(const char *name, uint32 a, uint8 v, int c, int s, int type, void* data)
112{
113 char str[256] = { 0 };
114 GetCheatStr(str, a, v, c);
115
116 LVITEM lvi = { 0 };
117 lvi.mask = LVIF_TEXT;
118 lvi.iItem = data ? *((int*)data) : GGLISTSIZE;
119 lvi.pszText = str;
120
121 if (data)
122 SendDlgItemMessage(hCheat, IDC_LIST_CHEATS, LVM_SETITEM, 0, (LPARAM)&lvi);
123 else
124 lvi.iItem = SendDlgItemMessage(hCheat, IDC_LIST_CHEATS, LVM_INSERTITEM, 0, (LPARAM)&lvi);
125 lvi.iSubItem = 1;
126 lvi.pszText = (LPSTR)name;
127 SendDlgItemMessage(hCheat, IDC_LIST_CHEATS, LVM_SETITEM, 0, (LPARAM)&lvi);
128
129 lvi.mask = LVIF_STATE;
130 lvi.stateMask = LVIS_STATEIMAGEMASK;
131 lvi.state = INDEXTOSTATEIMAGEMASK(s ? 2 : 1);
132 SendDlgItemMessage(hCheat, IDC_LIST_CHEATS, LVM_SETITEMSTATE, lvi.iItem, (LPARAM)&lvi);
133
134
135 return 1;
136}
137
138void RedoCheatsLB(HWND hwndDlg)
139{

Callers 2

CheatConsoleCallBFunction · 0.85
GGConvCallBFunction · 0.85

Calls 1

GetCheatStrFunction · 0.85

Tested by

no test coverage detected