SameBoy | Accurate GB/GBC emulator |
| download: https://git.y1.nz/archives/sameboy.tar.gz | |
| README | Files | Log | Refs | LICENSE |
commit 1247d00cbbd15b88f6274e983b3e6e8b7479b157 parent 9e5d3e449b391abc79d1fd716408dc2c910f6fb6 Author: Lior Halphon <LIJI32@gmail.com> Date: Fri, 30 Dec 2022 17:32:36 +0200 Minor cosmetic change Diffstat:
| M | Core/cheats.c | 16 | ++++++++-------- |
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/Core/cheats.c b/Core/cheats.c @@ -36,14 +36,14 @@ void GB_apply_cheat(GB_gameboy_t *gb, uint16_t address, uint8_t *value) if (likely(gb->cheat_count == 0)) return; // Optimization if (unlikely(!gb->boot_rom_finished)) return; const GB_cheat_hash_t *hash = gb->cheat_hash[hash_addr(address)]; - if (unlikely(hash)) { - for (unsigned i = 0; i < hash->size; i++) { - GB_cheat_t *cheat = hash->cheats[i]; - if (cheat->address == address && cheat->enabled && (!cheat->use_old_value || cheat->old_value == *value)) { - if (cheat->bank == GB_CHEAT_ANY_BANK || cheat->bank == bank_for_addr(gb, address)) { - *value = cheat->value; - break; - } + if (likely(!hash)) return; + + for (unsigned i = 0; i < hash->size; i++) { + GB_cheat_t *cheat = hash->cheats[i]; + if (cheat->address == address && cheat->enabled && (!cheat->use_old_value || cheat->old_value == *value)) { + if (cheat->bank == GB_CHEAT_ANY_BANK || cheat->bank == bank_for_addr(gb, address)) { + *value = cheat->value; + break; } } }
This webpage is intended to be an accessible preview of this repository. To get a fuller picture, clone it and use the git CLI.