mirror of
https://github.com/libretro/snes9x.git
synced 2024-11-27 18:40:39 +00:00
macOS: only try to enable valid cheats
This commit is contained in:
parent
b65b07112c
commit
843c46053f
@ -296,7 +296,7 @@ static void DetachCheatItems (void)
|
||||
char code[10];
|
||||
snprintf(code, 10, "%x=%x", citem[i].address, citem[i].value);
|
||||
int index = S9xAddCheatGroup(citem[i].description, code);
|
||||
if(citem[i].enabled)
|
||||
if(citem[i].enabled && index >= 0)
|
||||
S9xEnableCheatGroup(index);
|
||||
}
|
||||
}
|
||||
|
@ -1470,7 +1470,8 @@ static void CheatFinderAddEntry (SInt64 value, char *description)
|
||||
char code[10];
|
||||
snprintf(code, 10, "%x=%x", addr + i + 0x7E0000, (UInt8) ((v & (0x000000FF << (i * 8))) >> (i * 8)));
|
||||
int index = S9xAddCheatGroup(description, code);
|
||||
S9xEnableCheatGroup(index);
|
||||
if(index >= 0)
|
||||
S9xEnableCheatGroup(index);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user