From 6218649b4cd31e0ad8137da3bee2260acf096b3a Mon Sep 17 00:00:00 2001 From: Eric Warmenhoven Date: Mon, 5 Jun 2023 01:55:26 -0400 Subject: [PATCH] tvOS: Fix analog stick handling after adding Siri remote tap support --- ui/drivers/cocoa/cocoa_common.m | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/ui/drivers/cocoa/cocoa_common.m b/ui/drivers/cocoa/cocoa_common.m index ad49007018..0f6fc9996e 100644 --- a/ui/drivers/cocoa/cocoa_common.m +++ b/ui/drivers/cocoa/cocoa_common.m @@ -145,13 +145,21 @@ void *glkitview_init(void); if (controller.extendedGamepad) { if (type == UIPressTypeUpArrow) - extendedPress |= controller.extendedGamepad.dpad.up.pressed; + extendedPress |= controller.extendedGamepad.dpad.up.pressed + || controller.extendedGamepad.leftThumbstick.up.pressed + || controller.extendedGamepad.rightThumbstick.up.pressed; else if (type == UIPressTypeDownArrow) - extendedPress |= controller.extendedGamepad.dpad.down.pressed; + extendedPress |= controller.extendedGamepad.dpad.down.pressed + || controller.extendedGamepad.leftThumbstick.down.pressed + || controller.extendedGamepad.rightThumbstick.down.pressed; else if (type == UIPressTypeLeftArrow) - extendedPress |= controller.extendedGamepad.dpad.left.pressed; + extendedPress |= controller.extendedGamepad.dpad.left.pressed + || controller.extendedGamepad.leftThumbstick.left.pressed + || controller.extendedGamepad.rightThumbstick.left.pressed; else if (type == UIPressTypeRightArrow) - extendedPress |= controller.extendedGamepad.dpad.right.pressed; + extendedPress |= controller.extendedGamepad.dpad.right.pressed + || controller.extendedGamepad.leftThumbstick.right.pressed + || controller.extendedGamepad.rightThumbstick.right.pressed; else if (type == UIPressTypeSelect) extendedPress |= controller.extendedGamepad.buttonA.pressed; else if (type == UIPressTypeMenu)