From 7d93470738c5aa0c67ff51d9cca56988e900fb07 Mon Sep 17 00:00:00 2001 From: Riley Testut Date: Wed, 19 Oct 2022 17:07:56 -0500 Subject: [PATCH] Fixes taps sometimes not dismissing active callout view when remapping inputs --- .../Controllers/ControllerInputsViewController.swift | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Delta/Settings/Controllers/ControllerInputsViewController.swift b/Delta/Settings/Controllers/ControllerInputsViewController.swift index c7ad1c9..e607eca 100644 --- a/Delta/Settings/Controllers/ControllerInputsViewController.swift +++ b/Delta/Settings/Controllers/ControllerInputsViewController.swift @@ -453,6 +453,12 @@ extension ControllerInputsViewController: UIGestureRecognizerDelegate return self.activeCalloutView != nil } + func gestureRecognizer(_ gestureRecognizer: UIGestureRecognizer, shouldRecognizeSimultaneouslyWith otherGestureRecognizer: UIGestureRecognizer) -> Bool + { + // Necessary to prevent other gestures (e.g. GameViewController's resumeEmulationIfNeeded() tap gesture) from cancelling tap. + return true + } + @IBAction private func handleTapGesture(_ tapGestureRecognizer: UITapGestureRecognizer) { self.updateActiveCalloutView(with: nil)