mirror of https://github.com/mgba-emu/mgba.git
Qt: Add keyboard shortcut to exit fullscreen (fixes #205)
This commit is contained in:
parent
b6ddf8fd00
commit
9d80089194
|
@ -374,6 +374,14 @@ void Window::dropEvent(QDropEvent* event) {
|
|||
m_controller->loadGame(url.path());
|
||||
}
|
||||
|
||||
void Window::exitFullScreen() {
|
||||
if (!isFullScreen()) {
|
||||
return;
|
||||
}
|
||||
showNormal();
|
||||
menuBar()->show();
|
||||
}
|
||||
|
||||
void Window::toggleFullScreen() {
|
||||
if (isFullScreen()) {
|
||||
showNormal();
|
||||
|
@ -817,6 +825,8 @@ void Window::setupMenu(QMenuBar* menubar) {
|
|||
m_controller->setTurbo(false, false);
|
||||
}, QKeySequence(Qt::Key_Tab), tr("Fast Forward (held)"), "holdFastForward");
|
||||
|
||||
addControlledAction(other, other->addAction(tr("Exit fullscreen"), this, SLOT(exitFullScreen()), QKeySequence("Esc")), "exitFullscreen");
|
||||
|
||||
foreach (QAction* action, m_gameActions) {
|
||||
action->setDisabled(true);
|
||||
}
|
||||
|
|
|
@ -59,6 +59,7 @@ public slots:
|
|||
void selectROM();
|
||||
void selectBIOS();
|
||||
void selectPatch();
|
||||
void exitFullScreen();
|
||||
void toggleFullScreen();
|
||||
void loadConfig();
|
||||
void saveConfig();
|
||||
|
|
Loading…
Reference in New Issue