mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-06-06 06:34:35 +00:00
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.
This commit is contained in:
parent
01a7588f8e
commit
1146ea484a
1 changed files with 1 additions and 7 deletions
|
|
@ -1060,13 +1060,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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue