Qt: Release held actions if they get rebound
Vicki Pfau vi@endrift.com
Sat, 11 Jan 2020 14:02:10 -0800
2 files changed,
5 insertions(+),
1 deletions(-)
M
CHANGES
→
CHANGES
@@ -110,6 +110,7 @@ - Qt: Fix "restart needed" dialog after first config (fixes mgba.io/i/1601)
- Qt: Fix undesired screen filtering when paused (fixes mgba.io/i/1602) - Qt: Fix sprite view using wrong base address (fixes mgba.io/i/1603) - Qt: Fix inability to clear default keybindings + - Qt: Release held actions if they get rebound - Vita: Fix analog controls (fixes mgba.io/i/1554) Misc: - GB Memory: Support manual SRAM editing (fixes mgba.io/i/1580)
M
src/platform/qt/ShortcutController.cpp
→
src/platform/qt/ShortcutController.cpp
@@ -45,8 +45,11 @@ }
void ShortcutController::updateKey(std::shared_ptr<Shortcut> item, int keySequence) { int oldShortcut = item->shortcut(); - if (m_actions->isHeld(item->name())) { + if (oldShortcut != keySequence && m_actions->isHeld(item->name())) { if (oldShortcut > 0) { + if (item->action() && item->action()->booleanAction()) { + item->action()->booleanAction()(false); + } m_heldKeys.take(oldShortcut); } if (keySequence > 0) {