From 0d304e8a96c21e6d5f466f644d4beae1fcf3f7fb Mon Sep 17 00:00:00 2001 From: elasota Date: Tue, 3 Nov 2020 19:08:53 -0500 Subject: [PATCH] Disallow menu shortcuts when the menu is visible. Fixes unintended feature access when using OTG keyboards on Android. --- PortabilityLayer/MenuManager.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/PortabilityLayer/MenuManager.cpp b/PortabilityLayer/MenuManager.cpp index 807451c..0cdd54f 100644 --- a/PortabilityLayer/MenuManager.cpp +++ b/PortabilityLayer/MenuManager.cpp @@ -658,6 +658,9 @@ namespace PortabilityLayer bool MenuManagerImpl::FindMenuShortcut(uint16_t &menuID, uint16_t &itemID, uint8_t shortcutChar) { + if (!m_menuBarVisible) + return false; + MenuHandle menuH = m_firstMenu; while (menuH) {