From 1db70f21f2ba41479a61de8a96635b9d631e6867 Mon Sep 17 00:00:00 2001 From: Sour Date: Mon, 22 Jun 2026 17:11:10 +0900 Subject: [PATCH] GBA: DMA should stop if it disables itself Fixes the destoer/dma_priority test (test 5 "after" should be 0, not 2) --- Core/GBA/GbaDmaController.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Core/GBA/GbaDmaController.cpp b/Core/GBA/GbaDmaController.cpp index cd7abd48e..09ec236d2 100644 --- a/Core/GBA/GbaDmaController.cpp +++ b/Core/GBA/GbaDmaController.cpp @@ -187,7 +187,7 @@ void GbaDmaController::RunDma(GbaDmaChannel& ch, uint8_t chIndex) _dmaActiveChannel = chIndex; - while(length-- > 0) { + while(length-- > 0 && ch.Enabled) { uint32_t value; if(srcAddr >= 0x2000000) { if(!isRomSrc) {