Qt: Add keyboard shortcut to exit fullscreen (fixes #205)

This commit is contained in:
Jeffrey Pfau 2015-03-24 22:54:13 -07:00
parent b6ddf8fd00
commit 9d80089194
2 changed files with 11 additions and 0 deletions

View File

@ -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);
}

View File

@ -59,6 +59,7 @@ public slots:
void selectROM();
void selectBIOS();
void selectPatch();
void exitFullScreen();
void toggleFullScreen();
void loadConfig();
void saveConfig();