winport:
- fixed toggle on/off for Action Replay (double click in list)
This commit is contained in:
parent
cc0c3c4e26
commit
822552b138
|
@ -468,11 +468,13 @@ BOOL cheatsUpdate_AR(char *code, char *description, BOOL enabled, u32 pos)
|
|||
{
|
||||
if (pos > cheatsNum) return FALSE;
|
||||
|
||||
if (!cheatsXXcodePreparser(&cheats[pos], code)) return FALSE;
|
||||
if (code != NULL)
|
||||
{
|
||||
if (!cheatsXXcodePreparser(&cheats[pos], code)) return FALSE;
|
||||
strcpy(cheats[pos].description, description);
|
||||
cheats[pos].type = 1;
|
||||
}
|
||||
|
||||
cheats[pos].type = 1;
|
||||
|
||||
strcpy(cheats[pos].description, description);
|
||||
cheats[pos].enabled = enabled;
|
||||
return TRUE;
|
||||
}
|
||||
|
@ -495,11 +497,12 @@ BOOL cheatsUpdate_CB(char *code, char *description, BOOL enabled, u32 pos)
|
|||
{
|
||||
if (pos > cheatsNum) return FALSE;
|
||||
|
||||
if (!cheatsXXcodePreparser(&cheats[pos], code)) return FALSE;
|
||||
|
||||
cheats[pos].type = 2;
|
||||
|
||||
strcpy(cheats[pos].description, description);
|
||||
if (code != NULL)
|
||||
{
|
||||
if (!cheatsXXcodePreparser(&cheats[pos], code)) return FALSE;
|
||||
cheats[pos].type = 2;
|
||||
strcpy(cheats[pos].description, description);
|
||||
}
|
||||
cheats[pos].enabled = enabled;
|
||||
return TRUE;
|
||||
}
|
||||
|
|
|
@ -695,7 +695,22 @@ BOOL CALLBACK CheatsListBox_Proc(HWND dialog, UINT msg,WPARAM wparam,LPARAM lpar
|
|||
cheatEditPos = ListView_GetNextItem(cheatListView, -1, LVNI_SELECTED|LVNI_FOCUSED);
|
||||
cheatsGet(&tempCheat, cheatEditPos);
|
||||
tempCheat.enabled = !tempCheat.enabled;
|
||||
cheatsUpdate(tempCheat.size, tempCheat.hi[0], tempCheat.lo[0], tempCheat.description, tempCheat.enabled, cheatEditPos);
|
||||
switch (tempCheat.type)
|
||||
{
|
||||
case 0: // internal
|
||||
cheatsUpdate(tempCheat.size, tempCheat.hi[0], tempCheat.lo[0], tempCheat.description, tempCheat.enabled, cheatEditPos);
|
||||
break;
|
||||
|
||||
case 1: // Action Replay
|
||||
cheatsUpdate_AR(NULL, NULL, tempCheat.enabled, cheatEditPos);
|
||||
break;
|
||||
|
||||
case 2: // Codebreaker
|
||||
cheatsUpdate_CB(NULL, NULL, tempCheat.enabled, cheatEditPos);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
if (tempCheat.enabled)
|
||||
ListView_SetItemText(cheatListView, cheatEditPos, 0, "X")
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue