mirror of https://github.com/mgba-emu/mgba.git
GB Memory: Fix HDMAs running when screen is off
This commit is contained in:
parent
0ae51f47d9
commit
3f05b12bc1
|
@ -495,7 +495,7 @@ uint8_t GBMemoryWriteHDMA5(struct GB* gb, uint8_t value) {
|
|||
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 {
|
||||
|
|
Loading…
Reference in New Issue