From f438a8c8a3d2f6bbba1bd277eb7ae52b5a58c00c Mon Sep 17 00:00:00 2001 From: cottonvibes Date: Sun, 29 Aug 2010 05:13:12 +0000 Subject: [PATCH] pcsx2 MMI: another fix for PMFHL_CLAMP. The dst param was never being modified since it was being passed by value instead of by reference. This leads me to believe the rest of MMI.cpp is probably riddled with errors too. git-svn-id: http://pcsx2.googlecode.com/svn/trunk@3698 96395faa-99c1-11dd-bbfe-3dabce05a288 --- pcsx2/MMI.cpp | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/pcsx2/MMI.cpp b/pcsx2/MMI.cpp index bf4d8e2ecd..cf5983d292 100644 --- a/pcsx2/MMI.cpp +++ b/pcsx2/MMI.cpp @@ -171,14 +171,11 @@ void PLZCW() { _PLZCW (1); } -__fi void PMFHL_CLAMP(u16 dst, u32 src) +__fi void PMFHL_CLAMP(u16& dst, s32 src) { - if ((int)src > (int)0x00007fff) - dst = 0x7fff; - else if ((int)src < (int)0xffff8000) - dst = 0x8000; - else - dst = (u16)src; + if (src > 0x00007fff) dst = 0x7fff; + else if (src < 0xffff8000) dst = 0x8000; + else dst = (u16)src; } void PMFHL() {