mirror of
https://github.com/ekeeke/Genesis-Plus-GX.git
synced 2024-12-27 03:31:49 +01:00
[libretro] fixed cheat support regression introduced in previous commit
This commit is contained in:
parent
98b5c60355
commit
90bb356a17
Binary file not shown.
@ -2242,8 +2242,6 @@ static void apply_cheats(void)
|
|||||||
for (i = 0; i < maxcheats; i++)
|
for (i = 0; i < maxcheats; i++)
|
||||||
{
|
{
|
||||||
if (cheatlist[i].enable)
|
if (cheatlist[i].enable)
|
||||||
{
|
|
||||||
if (cheatlist[i].address < cart.romsize)
|
|
||||||
{
|
{
|
||||||
/* detect Work RAM patch */
|
/* detect Work RAM patch */
|
||||||
if (cheatlist[i].address >= 0xFF0000)
|
if (cheatlist[i].address >= 0xFF0000)
|
||||||
@ -2271,6 +2269,14 @@ static void apply_cheats(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* detect cartridge ROM patch */
|
/* detect cartridge ROM patch */
|
||||||
|
else if (cheatlist[i].address < cart.romsize)
|
||||||
|
{
|
||||||
|
if ((system_hw & SYSTEM_PBC) == SYSTEM_MD)
|
||||||
|
{
|
||||||
|
/* patch ROM data */
|
||||||
|
cheatlist[i].old = *(uint16_t *)(cart.rom + (cheatlist[i].address & 0xFFFFFE));
|
||||||
|
*(uint16_t *)(cart.rom + (cheatlist[i].address & 0xFFFFFE)) = cheatlist[i].data;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* add ROM patch */
|
/* add ROM patch */
|
||||||
|
Loading…
Reference in New Issue
Block a user