mirror of https://github.com/mgba-emu/mgba.git
Qt: Fix toggled actions on gamepads (fixes #1650)
This commit is contained in:
parent
e217a1fefb
commit
cd2bb61b0e
1
CHANGES
1
CHANGES
|
@ -18,6 +18,7 @@ Other fixes:
|
|||
- Qt: Fix color selection in asset view (fixes mgba.io/i/1648)
|
||||
- Qt: Fix missing OSD messages
|
||||
- Qt: Fix crash unloading shaders
|
||||
- Qt: Fix toggled actions on gamepads (fixes mgba.io/i/1650)
|
||||
|
||||
0.8.0: (2020-01-21)
|
||||
Features:
|
||||
|
|
|
@ -159,7 +159,11 @@ bool ShortcutController::eventFilter(QObject*, QEvent* event) {
|
|||
}
|
||||
Action* action = item.value()->action();
|
||||
if (action) {
|
||||
action->trigger();
|
||||
if (m_actions->isHeld(action->name())) {
|
||||
action->trigger(true);
|
||||
} else {
|
||||
action->trigger(!action->isActive());
|
||||
}
|
||||
}
|
||||
event->accept();
|
||||
return true;
|
||||
|
@ -170,7 +174,7 @@ bool ShortcutController::eventFilter(QObject*, QEvent* event) {
|
|||
return false;
|
||||
}
|
||||
Action* action = item.value()->action();
|
||||
if (action) {
|
||||
if (action && m_actions->isHeld(action->name())) {
|
||||
action->trigger(false);
|
||||
}
|
||||
event->accept();
|
||||
|
@ -184,7 +188,15 @@ bool ShortcutController::eventFilter(QObject*, QEvent* event) {
|
|||
}
|
||||
Action* action = item.value()->action();
|
||||
if (action) {
|
||||
action->trigger(gae->isNew());
|
||||
if (gae->isNew()) {
|
||||
if (m_actions->isHeld(action->name())) {
|
||||
action->trigger(true);
|
||||
} else {
|
||||
action->trigger(!action->isActive());
|
||||
}
|
||||
} else if (m_actions->isHeld(action->name())) {
|
||||
action->trigger(false);
|
||||
}
|
||||
}
|
||||
event->accept();
|
||||
return true;
|
||||
|
|
Loading…
Reference in New Issue