Browse Source

Switch the menu button on the Apple TV remote to the B button to match UI guidelines

Sam Lantinga 1 year ago
parent
commit
64939d3586
1 changed files with 7 additions and 3 deletions
  1. 7 3
      src/joystick/apple/SDL_mfijoystick.m

+ 7 - 3
src/joystick/apple/SDL_mfijoystick.m

@@ -638,8 +638,8 @@ static BOOL IOS_AddMFIJoystickDevice(SDL_JoystickDeviceItem *device, GCControlle
         int nbuttons = 0;
 
         device->button_mask |= (1 << SDL_GAMEPAD_BUTTON_SOUTH);
-        device->button_mask |= (1 << SDL_GAMEPAD_BUTTON_EAST); /* Button X on microGamepad */
-        device->button_mask |= (1 << SDL_GAMEPAD_BUTTON_START);
+        device->button_mask |= (1 << SDL_GAMEPAD_BUTTON_WEST); /* Button X on microGamepad */
+        device->button_mask |= (1 << SDL_GAMEPAD_BUTTON_EAST);
         nbuttons += 3;
         device->pause_button_index = (nbuttons - 1);
 
@@ -1965,7 +1965,11 @@ static SDL_bool IOS_JoystickGetGamepadMapping(int device_index, SDL_GamepadMappi
         } else if ([(NSString *)key isEqualToString:GCInputButtonHome]) {
             mapping = &out->guide;
         } else if ([(NSString *)key isEqualToString:GCInputButtonMenu]) {
-            mapping = &out->start;
+            if (device->is_siri_remote) {
+                mapping = &out->b;
+            } else {
+                mapping = &out->start;
+            }
         } else if ([(NSString *)key isEqualToString:GCInputButtonOptions]) {
             mapping = &out->back;
         } else if ([(NSString *)key isEqualToString:GCInputButtonShare]) {