From 0883dc08150e44dbb3f7d66948e2fa5f0046c4fd Mon Sep 17 00:00:00 2001 From: Vicki Pfau Date: Thu, 3 Aug 2017 14:33:51 -0700 Subject: [PATCH] GB I/O: Improve accuracy of SGB MLT_REG polling (fixes #839) --- src/gb/io.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gb/io.c b/src/gb/io.c index 6b45f47ff..962eeb1bf 100644 --- a/src/gb/io.c +++ b/src/gb/io.c @@ -485,7 +485,7 @@ static uint8_t _readKeys(struct GB* gb) { switch (gb->memory.io[REG_JOYP] & 0x30) { case 0x30: // TODO: Increment - keys = gb->model == GB_MODEL_SGB ? 0xF : 0; + keys = (gb->video.sgbCommandHeader >> 3) == SGB_MLT_REG ? 0xF : 0; break; case 0x20: keys >>= 4;