Bug #2121 » 0047-Do-not-include-SDL2-headers-when-SDL3-audio-enabled.patch
| client/gui-gtk-3.22/gui_main.c | ||
|---|---|---|
|
#include <fc_config.h>
|
||
|
#endif
|
||
|
#ifdef AUDIO_SDL
|
||
|
#ifdef AUDIO_SDL2
|
||
|
/* Though it would happily compile without this include,
|
||
|
* it is needed for sound to work.
|
||
|
* It defines "main" macro to rename our main() so that
|
||
| ... | ... | |
|
#else /* PLAIN_INCLUDE */
|
||
|
#include <SDL2/SDL.h>
|
||
|
#endif /* PLAIN_INCLUDE */
|
||
|
#endif /* AUDIO_SDL */
|
||
|
#endif /* AUDIO_SDL2 */
|
||
|
#ifdef HAVE_LOCALE_H
|
||
|
#include <locale.h>
|
||
| client/gui-gtk-4.0/gui_main.c | ||
|---|---|---|
|
#include <fc_config.h>
|
||
|
#endif
|
||
|
#ifdef AUDIO_SDL
|
||
|
#ifdef AUDIO_SDL2
|
||
|
/* Though it would happily compile without this include,
|
||
|
* it is needed for sound to work.
|
||
|
* It defines "main" macro to rename our main() so that
|
||
| ... | ... | |
|
#else /* PLAIN_INCLUDE */
|
||
|
#include <SDL2/SDL.h>
|
||
|
#endif /* PLAIN_INCLUDE */
|
||
|
#endif /* AUDIO_SDL */
|
||
|
#endif /* AUDIO_SDL2 */
|
||
|
#ifdef HAVE_LOCALE_H
|
||
|
#include <locale.h>
|
||
| client/gui-gtk-5.0/gui_main.c | ||
|---|---|---|
|
#include <fc_config.h>
|
||
|
#endif
|
||
|
#ifdef AUDIO_SDL
|
||
|
#ifdef AUDIO_SDL2
|
||
|
/* Though it would happily compile without this include,
|
||
|
* it is needed for sound to work.
|
||
|
* It defines "main" macro to rename our main() so that
|
||
| ... | ... | |
|
#else /* PLAIN_INCLUDE */
|
||
|
#include <SDL2/SDL.h>
|
||
|
#endif /* PLAIN_INCLUDE */
|
||
|
#endif /* AUDIO_SDL */
|
||
|
#endif /* AUDIO_SDL2 */
|
||
|
#ifdef HAVE_LOCALE_H
|
||
|
#include <locale.h>
|
||
| client/gui-qt/gui_main.cpp | ||
|---|---|---|
|
#include <fc_config.h>
|
||
|
#endif
|
||
|
#ifdef AUDIO_SDL
|
||
|
#ifdef AUDIO_SDL2
|
||
|
/* Though it would happily compile without this include,
|
||
|
* it is needed for sound to work.
|
||
|
* It defines "main" macro to rename our main() so that
|
||
| ... | ... | |
|
#else // PLAIN_INCLUDE
|
||
|
#include <SDL2/SDL.h>
|
||
|
#endif // PLAIN_INCLUDE
|
||
|
#endif // AUDIO_SDL
|
||
|
#endif // AUDIO_SDL2
|
||
|
#include <stdio.h>
|
||
| gen_headers/meson_fc_config.h.in | ||
|---|---|---|
|
/* Enable audio */
|
||
|
#mesondefine AUDIO_SDL
|
||
|
/* Use SDL3_mixer */
|
||
|
/* Use SDL2_mixer */
|
||
|
#mesondefine AUDIO_SDL2
|
||
|
/* Use sdl3-mixer */
|
||
|
#mesondefine AUDIO_SDL3
|
||
|
/* Native language support enabled */
|
||
| m4/sound.m4 | ||
|---|---|---|
|
SOUND_CFLAGS="$SOUND_CFLAGS $SDL2MIXER_CFLAGS"
|
||
|
SOUND_LIBS="$SOUND_LIBS $SDL2MIXER_LIBS"
|
||
|
AC_DEFINE([AUDIO_SDL], [1], [SDL Mixer support])
|
||
|
AC_DEFINE([AUDIO_SDL2], [1], [Use SDL2_Mixer])
|
||
|
SDL_mixer=sdl2
|
||
|
SOUND_SDL_OK=true
|
||
|
if test x$sdl_headers_without_path != xyes ; then
|
||
| ... | ... | |
|
SOUND_CFLAGS="$SOUND_CFLAGS $SDL2_CFLAGS"
|
||
|
SOUND_LIBS="$SOUND_LIBS -lSDL2_mixer $SDL2_LIBS"
|
||
|
AC_DEFINE([AUDIO_SDL], [1], [SDL Mixer support])
|
||
|
AC_DEFINE([AUDIO_SDL2], [1], [Use SDL2_Mixer])
|
||
|
AC_MSG_RESULT([yes])
|
||
|
SOUND_SDL_OK=true
|
||
|
else
|
||
| meson.build | ||
|---|---|---|
|
else
|
||
|
audio_sdl2_dep = dependency('SDL2_mixer')
|
||
|
audio_dep = [sdl2main_dep, audio_sdl2_dep]
|
||
|
priv_conf_data.set('AUDIO_SDL2', 1)
|
||
|
endif
|
||
|
audio_sdl_src = 'client/audio_sdl.c'
|
||