renamed SDL_JOYSTICK_USBHID_MACHINE_JOYSTICK_H to SDL_HAVE_MACHINE_JOYSTICK_H
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112
diff --git a/cmake/sdlchecks.cmake b/cmake/sdlchecks.cmake
index ea70774..74f0b19 100644
--- a/cmake/sdlchecks.cmake
+++ b/cmake/sdlchecks.cmake
@@ -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)
diff --git a/configure b/configure
index c793e31..1570e01 100755
--- a/configure
+++ b/configure
@@ -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
;;
diff --git a/configure.ac b/configure.ac
index 3a24688..cd3ce72 100644
--- a/configure.ac
+++ b/configure.ac
@@ -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
;;
diff --git a/include/SDL_config.h.cmake b/include/SDL_config.h.cmake
index b006545..977050d 100644
--- a/include/SDL_config.h.cmake
+++ b/include/SDL_config.h.cmake
@@ -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@
diff --git a/include/SDL_config.h.in b/include/SDL_config.h.in
index d40cac5..eb2b417 100644
--- a/include/SDL_config.h.in
+++ b/include/SDL_config.h.in
@@ -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
diff --git a/src/joystick/bsd/SDL_bsdjoystick.c b/src/joystick/bsd/SDL_bsdjoystick.c
index 2a2d797..57c44ba 100644
--- a/src/joystick/bsd/SDL_bsdjoystick.c
+++ b/src/joystick/bsd/SDL_bsdjoystick.c
@@ -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;