From f1ea9cca7a3c0a9463ef77d4f49517ce834832d0 Mon Sep 17 00:00:00 2001 From: zeromus Date: Sat, 25 Apr 2009 22:50:35 +0000 Subject: [PATCH] win32: fix compiling in release builds --- desmume/src/gfx3d.cpp | 2 +- desmume/src/types.h | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/desmume/src/gfx3d.cpp b/desmume/src/gfx3d.cpp index 034091d93..be7c24b41 100644 --- a/desmume/src/gfx3d.cpp +++ b/desmume/src/gfx3d.cpp @@ -1366,7 +1366,7 @@ void gfx3d_glFlush(u32 v) gfx3d.wbuffer = BIT1(v); } -static int gfx3d_ysort_compare(const void * elem1, const void * elem2) +static int _CDECL_ gfx3d_ysort_compare(const void * elem1, const void * elem2) { int num1 = *(int*)elem1; int num2 = *(int*)elem2; diff --git a/desmume/src/types.h b/desmume/src/types.h index 2612502a2..abaf1152e 100644 --- a/desmume/src/types.h +++ b/desmume/src/types.h @@ -114,6 +114,12 @@ #endif #endif +#ifdef _MSC_VER +#define _CDECL_ __cdecl +#else +#define _CDECL_ +#endif + #ifndef INLINE #if defined(_MSC_VER) || defined(__INTEL_COMPILER) #define INLINE _inline