Skip to content

Commit 5812cf1

Browse files
committed
remove unneeded HAVE_SDL2 macro
include <SDL_header> instead of <SDL2/SDL_heaaer>
1 parent 2e321f6 commit 5812cf1

File tree

4 files changed

+9
-26
lines changed

4 files changed

+9
-26
lines changed

configure.ac

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1261,7 +1261,6 @@ if test "$sdl_req" != no; then
12611261
if test "$sdl_version" = 1; then
12621262
SDL_LIBS="$SDL_LIBS -lX11" # X11 for x11_common.o
12631263
else
1264-
AC_DEFINE([HAVE_SDL2], [1], [Build with SDL2 support])
12651264
sdl_ver_suffix=2
12661265
fi
12671266
SDL_OBJ="src/video_display/sdl${sdl_ver_suffix}.o"

src/audio/capture/sdl_mixer.c

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -35,21 +35,13 @@
3535
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3636
*/
3737

38-
#ifdef HAVE_CONFIG_H
39-
#include "config.h"
40-
#endif // defined HAVE_CONFIG_H
41-
#include "config_unix.h"
42-
#include "config_win32.h"
43-
44-
#ifdef HAVE_SDL2
45-
#include <SDL2/SDL.h>
46-
#include <SDL2/SDL_mixer.h>
47-
#else
48-
#include <SDL/SDL.h>
49-
#include <SDL/SDL_mixer.h>
50-
#endif // defined HAVE_SDL2
51-
52-
#include <stdio.h>
38+
#include <SDL.h> // for SDL_Init, SDL_INIT_AUDIO
39+
#include <SDL_audio.h> // for AUDIO_S16LSB, AUDIO_S32LSB, AUDIO_S8
40+
#include <SDL_mixer.h> // for MIX_MAX_VOLUME, Mix_GetError, Mix_C...
41+
#include <stdio.h> // for NULL, fclose, fopen, size_t, FILE
42+
#include <stdlib.h> // for free, calloc, getenv, atoi, malloc
43+
#include <string.h> // for strlen, strncat, strchr, strcmp
44+
#include <unistd.h> // for unlink
5345

5446
#include "audio/audio_capture.h"
5547
#include "audio/types.h"

src/video_capture/testcard2.c

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
*/
4040

4141
#ifdef HAVE_CONFIG_H
42-
#include "config.h" // for HAVE_LIBSDL_TTF, HAVE_SDL2
42+
#include "config.h" // for HAVE_LIBSDL_TTF
4343
#endif // defined HAVE_CONFIG_H
4444

4545
#include <assert.h> // for assert
@@ -57,11 +57,7 @@
5757
#include <time.h> // for time
5858

5959
#ifdef HAVE_LIBSDL_TTF
60-
#ifdef HAVE_SDL2
61-
#include <SDL2/SDL_ttf.h>
62-
#else
63-
#include <SDL/SDL_ttf.h>
64-
#endif
60+
#include <SDL_ttf.h>
6561
#endif
6662

6763
#include "audio/types.h" // for audio_frame

src/video_display/sdl2.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,7 @@
4949
#define SDL_DISABLE_MMINTRIN_H 1
5050
#define SDL_DISABLE_IMMINTRIN_H 1
5151
#endif // defined __arm64__
52-
#if __has_include(<SDL2/SDL.h>)
53-
#include <SDL2/SDL.h>
54-
#else
5552
#include <SDL.h>
56-
#endif
5753

5854
#include <assert.h> // for assert
5955
#include <ctype.h> // for toupper

0 commit comments

Comments
 (0)