renamed SDL_JOYSTICK_USBHID_MACHINE_JOYSTICK_H to SDL_HAVE_MACHINE_JOYSTICK_H

main
Ozkan Sezer 2021-01-23 17:24:28 +03:00
parent 02e61a88fb
commit 2376458841
6 changed files with 10 additions and 8 deletions

View File

@ -1082,7 +1082,7 @@ macro(CheckUSBHID)
return 0;
}" HAVE_MACHINE_JOYSTICK)
if(HAVE_MACHINE_JOYSTICK)
set(SDL_JOYSTICK_USBHID_MACHINE_JOYSTICK_H 1)
set(SDL_HAVE_MACHINE_JOYSTICK_H 1)
endif()
set(SDL_JOYSTICK_USBHID 1)
file(GLOB BSD_JOYSTICK_SOURCES ${SDL2_SOURCE_DIR}/src/joystick/bsd/*.c)

3
configure vendored
View File

@ -24447,7 +24447,7 @@ fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
if test x$have_machine_joystick = xyes; then
$as_echo "#define SDL_JOYSTICK_USBHID_MACHINE_JOYSTICK_H 1" >>confdefs.h
$as_echo "#define SDL_HAVE_MACHINE_JOYSTICK_H 1" >>confdefs.h
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_machine_joystick" >&5
@ -24461,6 +24461,7 @@ $as_echo "#define SDL_JOYSTICK_USBHID 1" >>confdefs.h
EXTRA_LDFLAGS="$EXTRA_LDFLAGS $USB_LIBS"
have_joystick=yes
fi
CFLAGS="$save_CFLAGS"
fi
;;

View File

@ -3369,7 +3369,7 @@ CheckUSBHID()
have_machine_joystick=yes
])
if test x$have_machine_joystick = xyes; then
AC_DEFINE(SDL_JOYSTICK_USBHID_MACHINE_JOYSTICK_H, 1, [ ])
AC_DEFINE(SDL_HAVE_MACHINE_JOYSTICK_H, 1, [ ])
fi
AC_MSG_RESULT($have_machine_joystick)
@ -3379,6 +3379,7 @@ CheckUSBHID()
EXTRA_LDFLAGS="$EXTRA_LDFLAGS $USB_LIBS"
have_joystick=yes
fi
CFLAGS="$save_CFLAGS"
fi
;;

View File

@ -307,7 +307,7 @@
#cmakedefine SDL_JOYSTICK_WINMM @SDL_JOYSTICK_WINMM@
#cmakedefine SDL_JOYSTICK_OS2 @SDL_JOYSTICK_OS2@
#cmakedefine SDL_JOYSTICK_USBHID @SDL_JOYSTICK_USBHID@
#cmakedefine SDL_JOYSTICK_USBHID_MACHINE_JOYSTICK_H @SDL_JOYSTICK_USBHID_MACHINE_JOYSTICK_H@
#cmakedefine SDL_HAVE_MACHINE_JOYSTICK_H @SDL_HAVE_MACHINE_JOYSTICK_H@
#cmakedefine SDL_JOYSTICK_HIDAPI @SDL_JOYSTICK_HIDAPI@
#cmakedefine SDL_JOYSTICK_EMSCRIPTEN @SDL_JOYSTICK_EMSCRIPTEN@
#cmakedefine SDL_JOYSTICK_VIRTUAL @SDL_JOYSTICK_VIRTUAL@

View File

@ -309,7 +309,7 @@
#undef SDL_JOYSTICK_WINMM
#undef SDL_JOYSTICK_OS2
#undef SDL_JOYSTICK_USBHID
#undef SDL_JOYSTICK_USBHID_MACHINE_JOYSTICK_H
#undef SDL_HAVE_MACHINE_JOYSTICK_H
#undef SDL_JOYSTICK_HIDAPI
#undef SDL_JOYSTICK_RAWINPUT
#undef SDL_JOYSTICK_EMSCRIPTEN

View File

@ -69,7 +69,7 @@
#include <sys/joystick.h>
#endif
#if SDL_JOYSTICK_USBHID_MACHINE_JOYSTICK_H
#if SDL_HAVE_MACHINE_JOYSTICK_H
#include <machine/joystick.h>
#endif
@ -546,7 +546,7 @@ BSD_JoystickUpdate(SDL_Joystick *joy)
Sint32 dpad[4] = {0, 0, 0, 0};
#endif
#if defined(__FREEBSD__) || SDL_JOYSTICK_USBHID_MACHINE_JOYSTICK_H || defined(__FreeBSD_kernel__) || defined(__DragonFly_)
#if defined(__FREEBSD__) || SDL_HAVE_MACHINE_JOYSTICK_H || defined(__FreeBSD_kernel__) || defined(__DragonFly_)
struct joystick gameport;
static int x, y, xmin = 0xffff, ymin = 0xffff, xmax = 0, ymax = 0;
@ -591,7 +591,7 @@ BSD_JoystickUpdate(SDL_Joystick *joy)
}
return;
}
#endif /* defined(__FREEBSD__) || SDL_JOYSTICK_USBHID_MACHINE_JOYSTICK_H */
#endif /* defined(__FREEBSD__) || SDL_HAVE_MACHINE_JOYSTICK_H */
rep = &joy->hwdata->inreport;