diff --git a/Makefile b/Makefile index 06a33fba0f..c81682a0da 100644 --- a/Makefile +++ b/Makefile @@ -214,7 +214,7 @@ ifeq ($(HAVE_SDL), 1) endif ifeq ($(HAVE_SDL2), 1) - OBJ += gfx/sdl2_gfx.o input/sdl2_input.o input/sdl2_joypad.o + OBJ += gfx/sdl2_gfx.o input/sdl2_input.o input/sdl2_joypad.o audio/sdl_audio.o JOYCONFIG_OBJ += input/sdl2_joypad.o JOYCONFIG_LIBS += $(SDL2_LIBS) DEFINES += $(SDL2_CFLAGS) $(BSD_LOCAL_INC) diff --git a/audio/sdl_audio.c b/audio/sdl_audio.c index 832670f67a..e302e41f41 100644 --- a/audio/sdl_audio.c +++ b/audio/sdl_audio.c @@ -193,6 +193,10 @@ const audio_driver_t audio_sdl = { sdl_audio_set_nonblock_state, sdl_audio_free, NULL, +#ifdef HAVE_SDL2 + "sdl2" +#else "sdl" +#endif }; diff --git a/driver.c b/driver.c index 4eb5991bbb..8a0afe0a0b 100644 --- a/driver.c +++ b/driver.c @@ -69,7 +69,7 @@ static const audio_driver_t *audio_drivers[] = { #ifdef HAVE_JACK &audio_jack, #endif -#ifdef HAVE_SDL +#if defined(HAVE_SDL) || defined(HAVE_SDL2) &audio_sdl, #endif #ifdef HAVE_XAUDIO