소스 검색

Fixed 1598 - Mingwin build fails on src/audio/xaudio2/SDL_xaudio2.c

Sam Lantinga 12 년 전
부모
커밋
3f8df1097c
1개의 변경된 파일12개의 추가작업 그리고 0개의 파일을 삭제
  1. 12 0
      src/audio/xaudio2/SDL_xaudio2.c

+ 12 - 0
src/audio/xaudio2/SDL_xaudio2.c

@@ -48,6 +48,18 @@
 /* Hidden "this" pointer for the audio functions */
 #define _THIS   SDL_AudioDevice *this
 
+/* Fixes bug 1210 where some versions of gcc need named parameters */
+#ifdef __GNUC__
+#ifdef THIS
+#undef THIS
+#endif
+#define THIS    INTERFACE *p
+#ifdef THIS_
+#undef THIS_
+#endif
+#define THIS_   INTERFACE *p,
+#endif
+
 struct SDL_PrivateAudioData
 {
     IXAudio2 *ixa2;