From 4c21753dd9f44e8c7e958ba70a73fddbabe7ad57 Mon Sep 17 00:00:00 2001 From: zeromus Date: Tue, 21 Sep 2010 23:42:05 +0000 Subject: [PATCH] and fix compatibility for non-win32 systems --- desmume/src/types.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/desmume/src/types.h b/desmume/src/types.h index 36f79485c..8fe62b89d 100644 --- a/desmume/src/types.h +++ b/desmume/src/types.h @@ -452,7 +452,7 @@ FORCEINLINE s64 fx32_mul(const s32 a, const s32 b) #ifdef _WIN32 return __emul(a,b); #else - return a*b; + return ((s64)a)*((s64)b); #endif } @@ -468,9 +468,9 @@ FORCEINLINE s32 fx32_shiftdown(const s64 a) FORCEINLINE s64 fx32_shiftup(const s32 a) { #ifdef _WIN32 - return (s32)__ll_lshift(a,12); + return __ll_lshift(a,12); #else - return (s32)(a<<12); + return ((s64)a)<<12; #endif }