--- configure 2025-09-01 15:33:27.000000000 -0600 +++ configure 2026-06-08 19:26:48.000000000 -0600 @@ -29464,8 +29464,6 @@ printf "%s\n" "#define SDL_JOYSTICK_IOKIT 1" >>confdefs.h SOURCES="$SOURCES $srcdir/src/joystick/darwin/*.c" - SOURCES="$SOURCES $srcdir/src/joystick/iphoneos/*.m" - CheckJoystickMFI have_joystick=yes fi # Set up files for the haptic library --- src/joystick/SDL_joystick.c 2025-01-01 08:47:53.000000000 -0700 +++ src/joystick/SDL_joystick.c 2026-06-08 19:26:47.000000000 -0600 @@ -73,7 +73,7 @@ #ifdef SDL_JOYSTICK_IOKIT &SDL_DARWIN_JoystickDriver, #endif -#if (defined(__MACOSX__) || defined(__IPHONEOS__) || defined(__TVOS__)) && !defined(SDL_JOYSTICK_DISABLED) +#if (defined(__IPHONEOS__) || defined(__TVOS__)) && !defined(SDL_JOYSTICK_DISABLED) &SDL_IOS_JoystickDriver, #endif #ifdef SDL_JOYSTICK_ANDROID --- src/joystick/darwin/SDL_iokitjoystick.c 2025-01-01 08:47:53.000000000 -0700 +++ src/joystick/darwin/SDL_iokitjoystick.c 2026-06-08 19:26:47.000000000 -0600 @@ -535,6 +535,19 @@ return SDL_FALSE; } +#if !defined(__MAC_OS_X_VERSION_MAX_ALLOWED) || (__MAC_OS_X_VERSION_MAX_ALLOWED < 1060) +/* IOHIDDeviceGetService() is only declared in 10.6+ and I can't find + * a public way to recover the io_service_t backing an IOHIDDeviceRef, + * so return a null service. Input will still work, this + * value is used only to attach force feedback/rumble, which is therefore unavailable on + * 10.5. */ +static io_service_t IOHIDDeviceGetService(IOHIDDeviceRef device) +{ + (void)device; + return (io_service_t)0; +} +#endif + static void JoystickDeviceWasAddedCallback(void *ctx, IOReturn res, void *sender, IOHIDDeviceRef ioHIDDeviceObject) { recDevice *device;