diff --git a/desmume/src/OGLRender.cpp b/desmume/src/OGLRender.cpp index b17c37b19..e7956b617 100644 --- a/desmume/src/OGLRender.cpp +++ b/desmume/src/OGLRender.cpp @@ -79,7 +79,7 @@ static void ENDGL() { #include "shaders.h" #include "texcache.h" -static ALIGN(16) u8 GPU_screen3D [256*192*4]; +static DS_ALIGN(16) u8 GPU_screen3D [256*192*4]; static const unsigned short map3d_cull[4] = {GL_FRONT_AND_BACK, GL_FRONT, GL_BACK, 0}; static const int texEnv[4] = { GL_MODULATE, GL_DECAL, GL_MODULATE, GL_MODULATE }; diff --git a/desmume/src/gfx3d.cpp b/desmume/src/gfx3d.cpp index b9ba116aa..3446bfcd2 100644 --- a/desmume/src/gfx3d.cpp +++ b/desmume/src/gfx3d.cpp @@ -590,7 +590,7 @@ static void SetVertex() s16coord[2] }; - ALIGN(16) s32 coordTransformed[4] = { coord[0], coord[1], coord[2], (1<<12) }; + DS_ALIGN(16) s32 coordTransformed[4] = { coord[0], coord[1], coord[2], (1<<12) }; if (texCoordinateTransform == 3) { diff --git a/desmume/src/types.h b/desmume/src/types.h index 7e95b0b60..4825f3afc 100644 --- a/desmume/src/types.h +++ b/desmume/src/types.h @@ -82,17 +82,17 @@ #if defined(_MSC_VER) || defined(__INTEL_COMPILER) -#define ALIGN(X) __declspec(align(X)) +#define DS_ALIGN(X) __declspec(align(X)) #elif defined(__GNUC__) -#define ALIGN(X) __attribute__ ((aligned (X))) +#define DS_ALIGN(X) __attribute__ ((aligned (X))) #else -#define ALIGN(X) +#define DS_ALIGN(X) #endif -#define CACHE_ALIGN ALIGN(32) +#define CACHE_ALIGN DS_ALIGN(32) //use this for example when you want a byte value to be better-aligned -#define FAST_ALIGN ALIGN(4) +#define FAST_ALIGN DS_ALIGN(4) #ifndef FASTCALL #ifdef __MINGW32__