mirror of https://github.com/mgba-emu/mgba.git
Qt: Always show menu bar when paused, even in full screen
This commit is contained in:
parent
636e01d8df
commit
881dc1d8a3
|
@ -57,6 +57,14 @@ Window::Window(ConfigController* config, QWidget* parent)
|
||||||
connect(m_controller, SIGNAL(gameStopped(GBAThread*)), this, SLOT(gameStopped()));
|
connect(m_controller, SIGNAL(gameStopped(GBAThread*)), this, SLOT(gameStopped()));
|
||||||
connect(m_controller, SIGNAL(stateLoaded(GBAThread*)), m_display, SLOT(forceDraw()));
|
connect(m_controller, SIGNAL(stateLoaded(GBAThread*)), m_display, SLOT(forceDraw()));
|
||||||
connect(m_controller, SIGNAL(gamePaused(GBAThread*)), m_display, SLOT(pauseDrawing()));
|
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(gameUnpaused(GBAThread*)), m_display, SLOT(unpauseDrawing()));
|
||||||
connect(m_controller, SIGNAL(postLog(int, const QString&)), m_logView, SLOT(postLog(int, const QString&)));
|
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);
|
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 {
|
} else {
|
||||||
showFullScreen();
|
showFullScreen();
|
||||||
#ifndef Q_OS_MAC
|
#ifndef Q_OS_MAC
|
||||||
|
if (!m_controller->isPaused()) {
|
||||||
menuBar()->hide();
|
menuBar()->hide();
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue