GB Memory: Fix HDMAs running when screen is off
Vicki Pfau vi@endrift.com
Mon, 25 Jun 2018 15:17:06 -0700
1 files changed,
1 insertions(+),
1 deletions(-)
jump to
M
src/gb/memory.c
→
src/gb/memory.c
@@ -495,7 +495,7 @@ gb->memory.hdmaDest &= 0x1FF0;
gb->memory.hdmaDest |= 0x8000; bool wasHdma = gb->memory.isHdma; gb->memory.isHdma = value & 0x80; - if ((!wasHdma && !gb->memory.isHdma) || gb->video.mode == 0) { + if ((!wasHdma && !gb->memory.isHdma) || (GBRegisterLCDCIsEnable(gb->memory.io[REG_LCDC]) && gb->video.mode == 0)) { if (gb->memory.isHdma) { gb->memory.hdmaRemaining = 0x10; } else {