SDL_mfijoystick.m: fix build using older toolchains

Fixes https://github.com/libsdl-org/SDL/issues/4992
Fixes https://github.com/libsdl-org/SDL/issues/4958
This commit is contained in:
Ozkan Sezer 2021-11-22 05:11:10 +03:00
parent 1927c08036
commit ee2afa00ba
1 changed files with 6 additions and 4 deletions

View File

@ -1331,6 +1331,7 @@ IOS_JoystickGetCapabilities(SDL_Joystick *joystick)
{
Uint32 result = 0;
#if defined(ENABLE_MFI_LIGHT) || defined(ENABLE_MFI_RUMBLE)
@autoreleasepool {
SDL_JoystickDeviceItem *device = joystick->hwdata;
@ -1344,7 +1345,7 @@ IOS_JoystickGetCapabilities(SDL_Joystick *joystick)
if (controller.light) {
result |= SDL_JOYCAP_LED;
}
#endif /* ENABLE_MFI_LIGHT */
#endif
#ifdef ENABLE_MFI_RUMBLE
if (controller.haptics) {
@ -1356,9 +1357,10 @@ IOS_JoystickGetCapabilities(SDL_Joystick *joystick)
}
}
}
#endif /* ENABLE_MFI_RUMBLE */
#endif
}
}
#endif /* ENABLE_MFI_LIGHT || ENABLE_MFI_RUMBLE */
return result;
}