From 7f745d67cec8b445c8e29308c8a5e094430d4505 Mon Sep 17 00:00:00 2001 From: Marko Pusljar Date: Sun, 17 Apr 2011 16:44:42 +0000 Subject: [PATCH] small fix for previous commit (prevents startup crash, if GC game was started after WII game) git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7469 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Core/Core/Src/HW/DSP.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Source/Core/Core/Src/HW/DSP.cpp b/Source/Core/Core/Src/HW/DSP.cpp index 41f371cee2..1ffd1f96ad 100644 --- a/Source/Core/Core/Src/HW/DSP.cpp +++ b/Source/Core/Core/Src/HW/DSP.cpp @@ -274,7 +274,8 @@ void Init(bool hle) g_ARAM.ptr = (u8 *)AllocateMemoryPages(g_ARAM.size); } - g_audioDMA.AudioDMAControl.Hex = 0; + memset(&g_audioDMA, 0, sizeof(g_audioDMA)); + memset(&g_arDMA, 0, sizeof(g_arDMA)); g_dspState.DSPControl.Hex = 0; g_dspState.DSPControl.DSPHalt = 1; @@ -682,8 +683,7 @@ void Do_ARAM_DMA() { // Fake the DMA taking time to complete. The delay is not accurate, but // seems like a good estimate - CoreTiming::ScheduleEvent_Threadsafe( - g_arDMA.Cnt.count >> 1, et_GenerateDSPInterrupt, INT_ARAM | (1<<16)); + //CoreTiming::ScheduleEvent_Threadsafe(g_arDMA.Cnt.count >> 1, et_GenerateDSPInterrupt, INT_ARAM | (1<<16)); // Real hardware DMAs in 32byte chunks, but we can get by with 8byte chunks if (g_arDMA.Cnt.dir) @@ -720,6 +720,7 @@ void Do_ARAM_DMA() g_arDMA.Cnt.count -= 8; } } + GenerateDSPInterrupt(INT_ARAM); }