Qt: Always show menu bar when paused, even in full screen

This commit is contained in:
Jeffrey Pfau 2014-11-22 02:10:50 -08:00
parent 636e01d8df
commit 881dc1d8a3
1 changed files with 11 additions and 1 deletions

View File

@ -57,6 +57,14 @@ Window::Window(ConfigController* config, QWidget* parent)
connect(m_controller, SIGNAL(gameStopped(GBAThread*)), this, SLOT(gameStopped()));
connect(m_controller, SIGNAL(stateLoaded(GBAThread*)), m_display, SLOT(forceDraw()));
connect(m_controller, SIGNAL(gamePaused(GBAThread*)), m_display, SLOT(pauseDrawing()));
#ifndef Q_OS_MAC
connect(m_controller, SIGNAL(gamePaused(GBAThread*)), menuBar(), SLOT(show()));
connect(m_controller, &GameController::gameUnpaused, [this]() {
if(isFullScreen()) {
menuBar()->hide();
}
});
#endif
connect(m_controller, SIGNAL(gameUnpaused(GBAThread*)), m_display, SLOT(unpauseDrawing()));
connect(m_controller, SIGNAL(postLog(int, const QString&)), m_logView, SLOT(postLog(int, const QString&)));
connect(this, SIGNAL(startDrawing(const uint32_t*, GBAThread*)), m_display, SLOT(startDrawing(const uint32_t*, GBAThread*)), Qt::QueuedConnection);
@ -247,7 +255,9 @@ void Window::toggleFullScreen() {
} else {
showFullScreen();
#ifndef Q_OS_MAC
menuBar()->hide();
if (!m_controller->isPaused()) {
menuBar()->hide();
}
#endif
}
}