From d17a1f3d8f55d1e3129bb5bc3e3bb9246ab78d6a Mon Sep 17 00:00:00 2001 From: Riley Testut Date: Wed, 19 Oct 2022 17:14:22 -0500 Subject: [PATCH] Fixes remapping continuous inputs --- .../Controllers/ControllerInputsViewController.swift | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Delta/Settings/Controllers/ControllerInputsViewController.swift b/Delta/Settings/Controllers/ControllerInputsViewController.swift index e607eca..ccd4aa9 100644 --- a/Delta/Settings/Controllers/ControllerInputsViewController.swift +++ b/Delta/Settings/Controllers/ControllerInputsViewController.swift @@ -573,13 +573,19 @@ extension ControllerInputsViewController: GameControllerReceiver { func gameController(_ gameController: GameController, didActivate controllerInput: DeltaCore.Input, value: Double) { - guard self.isViewLoaded else { return } + guard self.isViewLoaded, value > 0.9 else { return } switch gameController { case self.gameViewController.controllerView: if let calloutView = self.calloutViews[AnyInput(controllerInput)] { + if controllerInput.isContinuous + { + // Make sure we only toggle calloutView once in a single gesture. + guard calloutView.state == .normal else { break } + } + self.toggle(calloutView) }