Qt: Always show menu bar when paused, even in full screen
Jeffrey Pfau jeffrey@endrift.com
Sat, 22 Nov 2014 02:10:50 -0800
1 files changed,
11 insertions(+),
1 deletions(-)
jump to
M
src/platform/qt/Window.cpp
→
src/platform/qt/Window.cpp
@@ -57,6 +57,14 @@ connect(m_controller, SIGNAL(gameStopped(GBAThread*)), m_display, SLOT(stopDrawing()));
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 @@ menuBar()->show();
} else { showFullScreen(); #ifndef Q_OS_MAC - menuBar()->hide(); + if (!m_controller->isPaused()) { + menuBar()->hide(); + } #endif } }