GB: SGB controller cleanup
Vicki Pfau vi@endrift.com
Mon, 02 Sep 2019 21:36:40 -0700
2 files changed,
3 insertions(+),
3 deletions(-)
M
src/gb/io.c
→
src/gb/io.c
@@ -532,13 +532,13 @@ }
static uint8_t _readKeys(struct GB* gb) { uint8_t keys = *gb->keySource; - if (gb->sgbCurrentController & gb->sgbControllers) { + if (gb->sgbCurrentController != 0) { keys = 0; } uint8_t joyp = gb->memory.io[REG_JOYP]; switch (joyp & 0x30) { case 0x30: - keys = gb->sgbCurrentController & gb->sgbControllers; + keys = gb->sgbCurrentController; break; case 0x20: keys >>= 4;
M
src/gb/video.c
→
src/gb/video.c
@@ -702,7 +702,7 @@ case SGB_ATTR_SET:
break; case SGB_MLT_REQ: video->p->sgbControllers = video->sgbPacketBuffer[1] & 0x3; - video->p->sgbCurrentController &= video->p->sgbControllers; + video->p->sgbCurrentController = 0; return; case SGB_MASK_EN: video->renderer->sgbRenderMode = video->sgbPacketBuffer[1] & 0x3;