Fixed trying to add a game controller mapping for the accelerometer on iOS

Fixes https://github.com/libsdl-org/SDL/issues/8716

(cherry picked from commit 0e5ea3cc4b98d061688a098836254ab6470b07e8)
This commit is contained in:
Sam Lantinga 2023-12-24 11:19:16 -08:00
parent 49eb375a59
commit 857e5b08c3

View file

@ -1834,6 +1834,9 @@ static SDL_bool IOS_JoystickGetGamepadMapping(int device_index, SDL_GamepadMappi
if (device == NULL) {
return SDL_FALSE;
}
if (device->accelerometer) {
return SDL_FALSE;
}
if (@available(macOS 10.16, iOS 14.0, tvOS 14.0, *)) {
int axis = 0;