From 6bb61bc67017c7f16678c4bb7f0e863997ca6457 Mon Sep 17 00:00:00 2001 From: Jeffrey Pfau Date: Fri, 19 Dec 2014 19:59:36 -0800 Subject: [PATCH] GBA Memory: Don't call into GPIO write calls if GPIO devices are absent --- CHANGES | 1 + src/gba/gba-memory.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index 422d5b2fb..34ece312c 100644 --- a/CHANGES +++ b/CHANGES @@ -8,6 +8,7 @@ Bugfixes: - GBA Thread: Allow halted games to exit cleanly - GBA BIOS: Fix HLE Lz77 and RL functions to properly account for width and invalid addresses - ARM7: Fix LDM writeback to a register already written + - GBA Memory: Don't call into GPIO write calls if GPIO devices are absent Misc: - Qt: Disable sync to video by default diff --git a/src/gba/gba-memory.c b/src/gba/gba-memory.c index a0a092c81..62c03a640 100644 --- a/src/gba/gba-memory.c +++ b/src/gba/gba-memory.c @@ -581,7 +581,7 @@ void GBAStore16(struct ARMCore* cpu, uint32_t address, int16_t value, int* cycle gba->video.renderer->writeOAM(gba->video.renderer, (address & (SIZE_OAM - 1)) >> 1); break; case REGION_CART0: - if (IS_GPIO_REGISTER(address & 0xFFFFFF)) { + if (memory->gpio.gpioDevices != GPIO_NONE && IS_GPIO_REGISTER(address & 0xFFFFFF)) { uint32_t reg = address & 0xFFFFFF; GBAGPIOWrite(&memory->gpio, reg, value); } else {