From 0f4b41d5ea717de6e3cd449b4d89f7b908a1ccb0 Mon Sep 17 00:00:00 2001 From: John Peterson Date: Mon, 10 Nov 2008 21:41:24 +0000 Subject: [PATCH] Small DSP HLE change git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1113 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_AXWii.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_AXWii.cpp b/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_AXWii.cpp index ecfba7bb55..ec0ab61c7d 100644 --- a/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_AXWii.cpp +++ b/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_AXWii.cpp @@ -83,8 +83,10 @@ int ReadOutPBsWii(u32 pbs_address, AXParamBlockWii* _pPBs, int _num) { const short *pSrc = (const short *)g_dspInitialize.pGetMemoryPointer(blockAddr); pAddr = blockAddr; - u32 nextBlock = (Common::swap16(pSrc[162]) << 16 | Common::swap16(pSrc[163])); - if (pSrc != NULL && nextBlock == blockAddr + 320) // new way to stop + + // Detect the last mail by checking when next_pb = 0 + u32 next_pb = (Common::swap16(pSrc[160]) << 16 | Common::swap16(pSrc[161])); + if (pSrc != NULL && next_pb > 0) { short *pDest = (short *)&_pPBs[i]; for (int p = 0; p < sizeof(AXParamBlockWii) / 2; p++)