and fix compatibility for non-win32 systems

This commit is contained in:
zeromus 2010-09-21 23:42:05 +00:00
parent 0a0c1f0fe6
commit 4c21753dd9
1 changed files with 3 additions and 3 deletions

View File

@ -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
}