GBA Audio: Reset audio FIFO DMA if an invalid destination is set
Jeffrey Pfau jeffrey@endrift.com
Fri, 08 Jul 2016 21:35:22 -0700
2 files changed,
7 insertions(+),
0 deletions(-)
M
CHANGES
→
CHANGES
@@ -30,6 +30,7 @@ - Util: Fix realloc semantics in utf16to8
- ARM7: Fix setting spsr privilege bits when spsr is empty - GBA BIOS: Fix ArcTan2 accuracy and boundary conditions - SDL: Fix sporadic crash when deinitializing audio + - GBA Audio: Reset audio FIFO DMA if an invalid destination is set Misc: - GBA: Slightly optimize GBAProcessEvents - Qt: Add preset for DualShock 4
M
src/gba/audio.c
→
src/gba/audio.c
@@ -126,6 +126,12 @@ case BASE_IO | REG_FIFO_B_LO:
audio->chB.dmaSource = number; break; default: + if (audio->chA.dmaSource == number) { + audio->chA.dmaSource = -1; + } + if (audio->chB.dmaSource == number) { + audio->chB.dmaSource = -1; + } mLOG(GBA_AUDIO, GAME_ERROR, "Invalid FIFO destination: 0x%08X", info->dest); return; }