Permalink
Browse files
GB Memory: Fix HDMAs running when screen is off
- Loading branch information...
Showing
with
1 addition
and
1 deletion.
-
+1
−1
src/gb/memory.c
|
|
@@ -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 {
|
|
|
|
0 comments on commit
3f05b12