Bump SDL requirement to SDL 2.0.

This commit is contained in:
Brandon Wright 2017-11-23 18:57:47 -06:00
parent ea9dc6307b
commit 2eaac353ba
2 changed files with 17 additions and 17 deletions

View File

@ -214,18 +214,18 @@ GTKJOY=0
SDL_CFLAGS=""
SDL_LIBS=""
if test yes = "$with_joystick"; then
PKG_CHECK_MODULES([SDL],[sdl],[
PKG_CHECK_MODULES([SDL],[sdl2],[
GTKJOY=yes
CFLAGS="$CFLAGS -DUSE_JOYSTICK"
],[
AC_CHECK_PROG(SDLCONFIGFOUND,[sdl-config],yes,no)
AC_CHECK_PROG(SDLCONFIGFOUND,[sdl2-config],yes,no)
if test yes = "$SDLCONFIGFOUND" ; then
SDL_CFLAGS="-DUSE_JOYSTICK `sdl-config --cflags`"
SDL_LIBS="`sdl-config --libs`"
SDL_CFLAGS="-DUSE_JOYSTICK `sdl2-config --cflags`"
SDL_LIBS="`sdl2-config --libs`"
GTKJOY=yes
else
echo "Cannot find SDL. Disabling joystick support."
echo "Cannot find SDL2. Disabling joystick support."
fi
])
fi

View File

@ -389,7 +389,7 @@ void
S9xInitInputDevices (void)
{
#ifdef USE_JOYSTICK
SDL_Init (SDL_INIT_VIDEO | SDL_INIT_JOYSTICK);
SDL_Init (SDL_INIT_JOYSTICK);
for (int i = 0; ; i++)
{