all repos — mgba @ 8ff6d778690fa215f778f7e8b22b59b38f19bd7a

mGBA Game Boy Advance Emulator

Make shutdown disabled when a game is not running
Jeffrey Pfau jeffrey@endrift.com
Tue, 22 Jul 2014 00:43:53 -0700
commit

8ff6d778690fa215f778f7e8b22b59b38f19bd7a

parent

6403d531bde314afcf7bbe31290dddc568121a03

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

jump to
M src/platform/qt/Window.cppsrc/platform/qt/Window.cpp

@@ -160,7 +160,11 @@ reset->setShortcut(tr("Ctrl+R"));

connect(reset, SIGNAL(triggered()), m_controller, SLOT(reset())); m_gameActions.append(reset); emulationMenu->addAction(reset); - emulationMenu->addAction(tr("Sh&utdown"), m_controller, SLOT(closeGame())); + + QAction* shutdown = new QAction(tr("Sh&utdown"), nullptr); + connect(shutdown, SIGNAL(triggered()), m_controller, SLOT(closeGame())); + m_gameActions.append(shutdown); + emulationMenu->addAction(shutdown); emulationMenu->addSeparator(); QAction* pause = new QAction(tr("&Pause"), nullptr);