Skip to content

Commit

Permalink
Guarded ElementAlreadyHandled with #ifdef ENABLE_PHYSICAL_INPUT_PROFI…
Browse files Browse the repository at this point in the history
…LE (thanks @Donione!)

Fixes libsdl-org#9033

(cherry picked from commit 3ebbf0f)
  • Loading branch information
slouken committed Feb 10, 2024
1 parent 93d7b6e commit 646ccce
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/joystick/iphoneos/SDL_mfijoystick.m
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,7 @@ static void CheckControllerSiriRemote(GCController *controller, int *is_siri_rem
*is_siri_remote = 0;
}

#ifdef ENABLE_PHYSICAL_INPUT_PROFILE
static BOOL ElementAlreadyHandled(SDL_JoystickDeviceItem *device, NSString *element, NSDictionary<NSString *, GCControllerElement *> *elements)
{
if ([element isEqualToString:@"Left Thumbstick Left"] ||
Expand Down Expand Up @@ -345,6 +346,7 @@ static BOOL ElementAlreadyHandled(SDL_JoystickDeviceItem *device, NSString *elem
}
return FALSE;
}
#endif /* ENABLE_PHYSICAL_INPUT_PROFILE */

static BOOL IOS_AddMFIJoystickDevice(SDL_JoystickDeviceItem *device, GCController *controller)
{
Expand Down

0 comments on commit 646ccce

Please sign in to comment.