From 1f65b326a844ce06099a198d73a600cf5c746006 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Tue, 31 Mar 2026 14:58:56 -0600 Subject: [PATCH] Make sure touch-gamepad components can't be focused by accident --- Common/UI/Root.cpp | 2 ++ UI/GamepadEmu.h | 1 + 2 files changed, 3 insertions(+) diff --git a/Common/UI/Root.cpp b/Common/UI/Root.cpp index 0e59c64510..609fa4f6d0 100644 --- a/Common/UI/Root.cpp +++ b/Common/UI/Root.cpp @@ -165,6 +165,8 @@ static void MoveFocus(ViewGroup *root, FocusDirection direction) { neigh.view->SetFocus(); root->SubviewFocused(neigh.view); + // INFO_LOG(Log::UI, "Focus moved from %s to %s", focusedView->DescribeText().c_str(), neigh.view->DescribeText().c_str()); + PlayUISound(UISound::SELECT); } } diff --git a/UI/GamepadEmu.h b/UI/GamepadEmu.h index 6a49ee07a4..6b106f6dae 100644 --- a/UI/GamepadEmu.h +++ b/UI/GamepadEmu.h @@ -46,6 +46,7 @@ public: virtual bool IsDownByTouch() const { return false; } + bool CanBeFocused() const override { return false; } protected: std::string key_;