all repos — mgba @ 83673cc5210aa50bcacb3bb5821d2974d6a8ea0c

mGBA Game Boy Advance Emulator

Qt: Release held actions if they get rebound
Vicki Pfau vi@endrift.com
Sat, 11 Jan 2020 14:02:10 -0800
commit

83673cc5210aa50bcacb3bb5821d2974d6a8ea0c

parent

ec4c91dbda0eb871948335b4b005f2b4ac280140

2 files changed, 5 insertions(+), 1 deletions(-)

jump to
M CHANGESCHANGES

@@ -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.cppsrc/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) {