Author: cazfi
Date: Wed Jun 22 19:50:32 2016
New Revision: 32962

URL: http://svn.gna.org/viewcvs/freeciv?rev=32962&view=rev
Log:
Respect SDL2_PLAIN_INCLUDE when including sdl2 headers to non-sdl clients

See patch #7291

Modified:
    trunk/client/gui-gtk-2.0/gui_main.c
    trunk/client/gui-gtk-3.0/gui_main.c
    trunk/client/gui-gtk-3.x/gui_main.c
    trunk/client/gui-qt/gui_main.cpp

Modified: trunk/client/gui-gtk-2.0/gui_main.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-gtk-2.0/gui_main.c?rev=32962&r1=32961&r2=32962&view=diff
==============================================================================
--- trunk/client/gui-gtk-2.0/gui_main.c (original)
+++ trunk/client/gui-gtk-2.0/gui_main.c Wed Jun 22 19:50:32 2016
@@ -17,10 +17,13 @@
 
 #ifdef AUDIO_SDL
 /* Though it would happily compile without this include,
- * it is needed for sound to work as long as SDL-1.2 mixer is
- * being used. It defines "main" macro to rename our main() so that
+ * it is needed for sound to work.
+ * It defines "main" macro to rename our main() so that
  * it can install SDL's own. */
-#ifdef AUDIO_SDL1_2
+#ifdef SDL2_PLAIN_INCLUDE
+#include <SDL.h>
+#include <SDL_mixer.h>
+#elif AUDIO_SDL1_2
 /* SDL */
 #include <SDL/SDL.h>
 #else  /* AUDIO_SDL1_2 */

Modified: trunk/client/gui-gtk-3.0/gui_main.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-gtk-3.0/gui_main.c?rev=32962&r1=32961&r2=32962&view=diff
==============================================================================
--- trunk/client/gui-gtk-3.0/gui_main.c (original)
+++ trunk/client/gui-gtk-3.0/gui_main.c Wed Jun 22 19:50:32 2016
@@ -17,10 +17,13 @@
 
 #ifdef AUDIO_SDL
 /* Though it would happily compile without this include,
- * it is needed for sound to work as long as SDL-1.2 mixer is
- * being used. It defines "main" macro to rename our main() so that
+ * it is needed for sound to work.
+ * It defines "main" macro to rename our main() so that
  * it can install SDL's own. */
-#ifdef AUDIO_SDL1_2
+#ifdef SDL2_PLAIN_INCLUDE
+#include <SDL.h>
+#include <SDL_mixer.h>
+#elif AUDIO_SDL1_2
 /* SDL */
 #include <SDL/SDL.h>
 #else  /* AUDIO_SDL1_2 */

Modified: trunk/client/gui-gtk-3.x/gui_main.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-gtk-3.x/gui_main.c?rev=32962&r1=32961&r2=32962&view=diff
==============================================================================
--- trunk/client/gui-gtk-3.x/gui_main.c (original)
+++ trunk/client/gui-gtk-3.x/gui_main.c Wed Jun 22 19:50:32 2016
@@ -17,10 +17,13 @@
 
 #ifdef AUDIO_SDL
 /* Though it would happily compile without this include,
- * it is needed for sound to work as long as SDL-1.2 mixer is
- * being used. It defines "main" macro to rename our main() so that
+ * it is needed for sound to work.
+ * It defines "main" macro to rename our main() so that
  * it can install SDL's own. */
-#ifdef AUDIO_SDL1_2
+#ifdef SDL2_PLAIN_INCLUDE
+#include <SDL.h>
+#include <SDL_mixer.h>
+#elif AUDIO_SDL1_2
 /* SDL */
 #include <SDL/SDL.h>
 #else  /* AUDIO_SDL1_2 */

Modified: trunk/client/gui-qt/gui_main.cpp
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-qt/gui_main.cpp?rev=32962&r1=32961&r2=32962&view=diff
==============================================================================
--- trunk/client/gui-qt/gui_main.cpp    (original)
+++ trunk/client/gui-qt/gui_main.cpp    Wed Jun 22 19:50:32 2016
@@ -17,10 +17,13 @@
 
 #ifdef AUDIO_SDL
 /* Though it would happily compile without this include,
- * it is needed for sound to work as long as SDL-1.2 mixer is
- * being used. It defines "main" macro to rename our main() so that
+ * it is needed for sound to work.
+ * It defines "main" macro to rename our main() so that
  * it can install SDL's own. */
-#ifdef AUDIO_SDL1_2
+#ifdef SDL2_PLAIN_INCLUDE
+#include <SDL.h>
+#include <SDL_mixer.h>
+#elif AUDIO_SDL1_2
 /* SDL */
 #include <SDL/SDL.h>
 #else  /* AUDIO_SDL1_2 */


_______________________________________________
Freeciv-commits mailing list
Freeciv-commits@gna.org
https://mail.gna.org/listinfo/freeciv-commits

Reply via email to