From eebe7558d5de65dfc987e9fc1e493b4771330a6a Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Fri, 24 Apr 2026 11:35:01 -0700 Subject: [PATCH] Fixed the menu controller button state on recent Apple platforms The OS reports the button state as of macOS 11.0, iOS 14.0, and tvOS 14.0, so use that instead of the deprecated pause handler. (cherry picked from commit 1146ea484a5972947528d5ae9b20ee874e71408d) --- src/joystick/apple/SDL_mfijoystick.m | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/joystick/apple/SDL_mfijoystick.m b/src/joystick/apple/SDL_mfijoystick.m index c7ed381d66..417869d7c7 100644 --- a/src/joystick/apple/SDL_mfijoystick.m +++ b/src/joystick/apple/SDL_mfijoystick.m @@ -1059,13 +1059,7 @@ static void IOS_MFIJoystickUpdate(SDL_Joystick *joystick) int button = 0; for (id key in device->buttons) { - bool down; - if (button == device->pause_button_index) { - down = (device->pause_button_pressed > 0); - } else { - down = buttons[key].isPressed; - } - SDL_SendJoystickButton(timestamp, joystick, button++, down); + SDL_SendJoystickButton(timestamp, joystick, button++, buttons[key].isPressed); } } else if (controller.extendedGamepad) { bool isstack;