mirror of https://github.com/mgba-emu/mgba.git
Qt: Fix fast forward crashing when no game loaded
This commit is contained in:
parent
883e7729f4
commit
17e5b6a455
|
@ -1167,9 +1167,13 @@ void Window::setupMenu(QMenuBar* menubar) {
|
||||||
emulationMenu->addSeparator();
|
emulationMenu->addSeparator();
|
||||||
|
|
||||||
m_shortcutController->addFunctions(emulationMenu, [this]() {
|
m_shortcutController->addFunctions(emulationMenu, [this]() {
|
||||||
|
if (m_controller) {
|
||||||
m_controller->setFastForward(true);
|
m_controller->setFastForward(true);
|
||||||
|
}
|
||||||
}, [this]() {
|
}, [this]() {
|
||||||
|
if (m_controller) {
|
||||||
m_controller->setFastForward(false);
|
m_controller->setFastForward(false);
|
||||||
|
}
|
||||||
}, QKeySequence(Qt::Key_Tab), tr("Fast forward (held)"), "holdFastForward");
|
}, QKeySequence(Qt::Key_Tab), tr("Fast forward (held)"), "holdFastForward");
|
||||||
|
|
||||||
QAction* turbo = new QAction(tr("&Fast forward"), emulationMenu);
|
QAction* turbo = new QAction(tr("&Fast forward"), emulationMenu);
|
||||||
|
|
Loading…
Reference in New Issue