SDL: Guarded ElementAlreadyHandled with #ifdef ENABLE_PHYSICAL_INPUT_PROFILE (thanks @Donione!) (a24e2)

From a24e2bfc76d52402ec6ae62c2cd3b3927e27d5f9 Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Fri, 9 Feb 2024 16:11:38 -0800
Subject: [PATCH] Guarded ElementAlreadyHandled with #ifdef
 ENABLE_PHYSICAL_INPUT_PROFILE (thanks @Donione!)

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

(cherry picked from commit 3ebbf0f409d4950162a99dd336f440e71a2330b8)
(cherry picked from commit 646cccede73bd5b405f49207df9e2926e26b4c29)
---
 src/joystick/iphoneos/SDL_mfijoystick.m | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/joystick/iphoneos/SDL_mfijoystick.m b/src/joystick/iphoneos/SDL_mfijoystick.m
index 4e4844010c8b..4bcaede9134e 100644
--- a/src/joystick/iphoneos/SDL_mfijoystick.m
+++ b/src/joystick/iphoneos/SDL_mfijoystick.m
@@ -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"] ||
@@ -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)
 {