GBA Audio: Reset audio FIFO DMA if an invalid destination is set

This commit is contained in:
Jeffrey Pfau 2016-07-08 21:35:22 -07:00
parent fcd1ce8073
commit 6fe17bc0f8
2 changed files with 7 additions and 0 deletions

View File

@ -30,6 +30,7 @@ Bugfixes:
- 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

View File

@ -126,6 +126,12 @@ void GBAAudioScheduleFifoDma(struct GBAAudio* audio, int number, struct GBADMA*
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;
}