Skip to content

Commit

Permalink
remove unneeded HAVE_SDL2 macro
Browse files Browse the repository at this point in the history
include <SDL_header> instead of <SDL2/SDL_heaaer>
  • Loading branch information
MartinPulec committed Jan 24, 2025
1 parent 2e321f6 commit 5812cf1
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 26 deletions.
1 change: 0 additions & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -1261,7 +1261,6 @@ if test "$sdl_req" != no; then
if test "$sdl_version" = 1; then
SDL_LIBS="$SDL_LIBS -lX11" # X11 for x11_common.o
else
AC_DEFINE([HAVE_SDL2], [1], [Build with SDL2 support])
sdl_ver_suffix=2
fi
SDL_OBJ="src/video_display/sdl${sdl_ver_suffix}.o"
Expand Down
22 changes: 7 additions & 15 deletions src/audio/capture/sdl_mixer.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,21 +35,13 @@
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

#ifdef HAVE_CONFIG_H
#include "config.h"
#endif // defined HAVE_CONFIG_H
#include "config_unix.h"
#include "config_win32.h"

#ifdef HAVE_SDL2
#include <SDL2/SDL.h>
#include <SDL2/SDL_mixer.h>
#else
#include <SDL/SDL.h>
#include <SDL/SDL_mixer.h>
#endif // defined HAVE_SDL2

#include <stdio.h>
#include <SDL.h> // for SDL_Init, SDL_INIT_AUDIO
#include <SDL_audio.h> // for AUDIO_S16LSB, AUDIO_S32LSB, AUDIO_S8
#include <SDL_mixer.h> // for MIX_MAX_VOLUME, Mix_GetError, Mix_C...
#include <stdio.h> // for NULL, fclose, fopen, size_t, FILE
#include <stdlib.h> // for free, calloc, getenv, atoi, malloc
#include <string.h> // for strlen, strncat, strchr, strcmp
#include <unistd.h> // for unlink

#include "audio/audio_capture.h"
#include "audio/types.h"
Expand Down
8 changes: 2 additions & 6 deletions src/video_capture/testcard2.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
*/

#ifdef HAVE_CONFIG_H
#include "config.h" // for HAVE_LIBSDL_TTF, HAVE_SDL2
#include "config.h" // for HAVE_LIBSDL_TTF
#endif // defined HAVE_CONFIG_H

#include <assert.h> // for assert
Expand All @@ -57,11 +57,7 @@
#include <time.h> // for time

#ifdef HAVE_LIBSDL_TTF
#ifdef HAVE_SDL2
#include <SDL2/SDL_ttf.h>
#else
#include <SDL/SDL_ttf.h>
#endif
#include <SDL_ttf.h>
#endif

#include "audio/types.h" // for audio_frame
Expand Down
4 changes: 0 additions & 4 deletions src/video_display/sdl2.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,7 @@
#define SDL_DISABLE_MMINTRIN_H 1
#define SDL_DISABLE_IMMINTRIN_H 1
#endif // defined __arm64__
#if __has_include(<SDL2/SDL.h>)
#include <SDL2/SDL.h>
#else
#include <SDL.h>
#endif

#include <assert.h> // for assert
#include <ctype.h> // for toupper
Expand Down

0 comments on commit 5812cf1

Please sign in to comment.