all repos — mgba @ 3f05b12bc11d152c51516470b763939e05a842cb

mGBA Game Boy Advance Emulator

GB Memory: Fix HDMAs running when screen is off
Vicki Pfau vi@endrift.com
Mon, 25 Jun 2018 15:17:06 -0700
commit

3f05b12bc11d152c51516470b763939e05a842cb

parent

0ae51f47d9240d065f7353f9c70cacefe5101c87

1 files changed, 1 insertions(+), 1 deletions(-)

jump to
M src/gb/memory.csrc/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 {