From ecad1bea38bc8203d3a8027fb9c2a57ae3edce03 Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Sun, 18 Oct 2020 15:04:09 -0500 Subject: [PATCH] Disable Guide button emulation on gamepads with physical Guide buttons --- Limelight/Input/ControllerSupport.m | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Limelight/Input/ControllerSupport.m b/Limelight/Input/ControllerSupport.m index bc3ee754..b5469fe8 100644 --- a/Limelight/Input/ControllerSupport.m +++ b/Limelight/Input/ControllerSupport.m @@ -500,6 +500,14 @@ static const double MOUSE_SPEED_DIVISOR = 2.5; } } + if (@available(iOS 14.0, tvOS 14.0, *)) { + if (controller.extendedGamepad != nil && + controller.extendedGamepad.buttonHome != nil) { + // Disable special button emulation since we have a physical special button + limeController.supportedEmulationFlags &= ~EMULATING_SPECIAL; + } + } + // Prepare controller haptics for use [self initializeControllerHaptics:limeController];