diff options
author | Twinaphex | 2017-08-26 09:09:41 +0200 |
---|---|---|
committer | GitHub | 2017-08-26 09:09:41 +0200 |
commit | 12b1ae1a13434dd0bdc5305d36811643306d8e3e (patch) | |
tree | 33e4229f9175a51e5fc309d05b5f83f3de19251f /source/cheats2.c | |
parent | b94a8041a928f5018d753d21d62507c1511af8d4 (diff) | |
parent | 7becd31bfe9ba0cd77ed9dc034563e0ab513a8c9 (diff) | |
download | snes9x2005-12b1ae1a13434dd0bdc5305d36811643306d8e3e.tar.gz snes9x2005-12b1ae1a13434dd0bdc5305d36811643306d8e3e.tar.bz2 snes9x2005-12b1ae1a13434dd0bdc5305d36811643306d8e3e.zip |
Merge pull request #43 from jamsilva/master
SA1 and SuperFX improvements
Diffstat (limited to 'source/cheats2.c')
-rw-r--r-- | source/cheats2.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/cheats2.c b/source/cheats2.c index cc303b8..067a929 100644 --- a/source/cheats2.c +++ b/source/cheats2.c @@ -81,7 +81,7 @@ void S9xRemoveCheat(uint32_t which1) uint8_t* ptr = Memory.Map [block]; if (ptr >= (uint8_t*) MAP_LAST) - *(ptr + (address & 0xffff)) = Cheat.c [which1].saved_byte; + ptr[address & 0xffff] = Cheat.c [which1].saved_byte; else S9xSetByte(Cheat.c [which1].saved_byte, address); /* Unsave the address for the next call to S9xRemoveCheat. */ @@ -102,7 +102,7 @@ void S9xApplyCheat(uint32_t which1) ptr = Memory.Map [block]; if (ptr >= (uint8_t*) MAP_LAST) - *(ptr + (address & 0xffff)) = Cheat.c [which1].byte; + ptr[address & 0xffff] = Cheat.c [which1].byte; else S9xSetByte(Cheat.c [which1].byte, address); Cheat.c [which1].saved = true; |