From e8f1e6024340ec70d173c237d8157185b46167ff Mon Sep 17 00:00:00 2001 From: rofl0r Date: Fri, 6 Dec 2024 02:21:49 +0000 Subject: [PATCH] xma2defs.h: macro hack for mingw's lack of __out etc directx/xma2defs.h:406:5: error: '__out' has not been declared note that we have to undef the macros on leaving the header, as these names are also used for some arguments in stdlibc++ headers. --- desmume/src/frontend/windows/directx/xma2defs.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/desmume/src/frontend/windows/directx/xma2defs.h b/desmume/src/frontend/windows/directx/xma2defs.h index 46b0b0103..1ba050bd5 100644 --- a/desmume/src/frontend/windows/directx/xma2defs.h +++ b/desmume/src/frontend/windows/directx/xma2defs.h @@ -10,6 +10,11 @@ #ifndef __XMA2DEFS_INCLUDED__ #define __XMA2DEFS_INCLUDED__ +#ifdef __MINGW32__ +#define __out +#define __in +#endif + #include // Markers for documenting API semantics #include // For S_OK, E_FAIL #include // Basic data types and constants for audio work @@ -714,5 +719,10 @@ __inline HRESULT LocalizeXma2Format(__inout XMA2WAVEFORMATEX* pXma2Format) #undef XMASWAP4BYTES } +#ifdef __MINGW32__ +#undef __out +#undef __in +#endif + #endif // #ifndef __XMA2DEFS_INCLUDED__