From 796b2d497071c8d1a79f3b9c3a4f6b76f82652d2 Mon Sep 17 00:00:00 2001 From: Gregory Hainaut Date: Sat, 27 Aug 2016 19:00:15 +0200 Subject: [PATCH] IPU: replace SATURATE macro with a function --- pcsx2/IPU/mpeg2lib/Mpeg.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pcsx2/IPU/mpeg2lib/Mpeg.cpp b/pcsx2/IPU/mpeg2lib/Mpeg.cpp index 1e6e3af025..4a0bf9c611 100644 --- a/pcsx2/IPU/mpeg2lib/Mpeg.cpp +++ b/pcsx2/IPU/mpeg2lib/Mpeg.cpp @@ -334,11 +334,11 @@ static __fi int get_chroma_dc_dct_diff() return dc_diff; } -#define SATURATE(val) \ -do { \ - if (((u32)(val + 2048) > 4095)) \ - val = (((s32)val) >> 31) ^ 2047; \ -} while (0) +static __fi void SATURATE(int& val) +{ + if ((u32)(val + 2048) > 4095) + val = (val >> 31) ^ 2047; +} static bool get_intra_block() {