From d837653b5fa3a826fd5a606462cbfac07d8185c9 Mon Sep 17 00:00:00 2001 From: rogerman Date: Tue, 16 Aug 2016 00:12:34 +0000 Subject: [PATCH] GFX3D: - Fix 3D rendering on non-MSVC builds. --- desmume/src/gfx3d.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/desmume/src/gfx3d.cpp b/desmume/src/gfx3d.cpp index d2e9c1c81..d93485685 100644 --- a/desmume/src/gfx3d.cpp +++ b/desmume/src/gfx3d.cpp @@ -632,20 +632,20 @@ FORCEINLINE s32 vec3dot_fixed32(const s32* a, const s32* b) { //I'm going to start name these functions GE for GEOMETRY ENGINE MATH. //Pretty much any math function in this file should be explicit about how it's handling precision. //Handling that stuff generically globally is not a winning proposition. - -FORCEINLINE s64 GEM_Mul32x32To64(const s32 a, const s32 b) -{ -#ifdef _MSC_VER - return __emul(a,b); -#else - return ((s64)a)*((s64)b); -#endif + +FORCEINLINE s64 GEM_Mul32x32To64(const s32 a, const s32 b) +{ +#ifdef _MSC_VER + return __emul(a,b); +#else + return ((s64)a)*((s64)b); +#endif } static s32 GEM_SaturateAndShiftdown36To32(const s64 val) { - if(val>0x000007FFFFFFFFFFLL) return 0x7FFFFFFF; - if(val<0xFFFFF80000000000LL) return 0x80000000; + if(val>(s64)0x000007FFFFFFFFFFULL) return (s32)0x7FFFFFFFU; + if(val<(s64)0xFFFFF80000000000ULL) return (s32)0x80000000U; return fx32_shiftdown(val); }