From 6d08ed3dd8e447a5ecbc7946ae1fda8aa5076d5d Mon Sep 17 00:00:00 2001 From: Jeffrey Pfau Date: Tue, 27 Jan 2015 02:09:41 -0800 Subject: [PATCH] GBA Video: Fix DISPSTAT write after refactor --- src/gba/gba-io.c | 2 +- src/gba/gba-video.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gba/gba-io.c b/src/gba/gba-io.c index 640c67880..03527f9aa 100644 --- a/src/gba/gba-io.c +++ b/src/gba/gba-io.c @@ -297,7 +297,7 @@ void GBAIOWrite(struct GBA* gba, uint32_t address, uint16_t value) { case REG_DISPSTAT: value &= 0xFFF8; GBAVideoWriteDISPSTAT(&gba->video, value); - break; + return; // Audio case REG_SOUND1CNT_LO: diff --git a/src/gba/gba-video.c b/src/gba/gba-video.c index 424a5f9b8..0cd7f52d5 100644 --- a/src/gba/gba-video.c +++ b/src/gba/gba-video.c @@ -169,7 +169,7 @@ int32_t GBAVideoProcessEvents(struct GBAVideo* video, int32_t cycles) { void GBAVideoWriteDISPSTAT(struct GBAVideo* video, uint16_t value) { video->p->memory.io[REG_DISPSTAT >> 1] &= 0x7; - video->p->memory.io[REG_DISPSTAT >> 1] |= value & 0xFFF8; + video->p->memory.io[REG_DISPSTAT >> 1] |= value; uint16_t dispstat = video->p->memory.io[REG_DISPSTAT >> 1];