all repos — mgba @ 881dc1d8a3167dc0269e9ecbd4ff5af9a89668a9

mGBA Game Boy Advance Emulator

Qt: Always show menu bar when paused, even in full screen
Jeffrey Pfau jeffrey@endrift.com
Sat, 22 Nov 2014 02:10:50 -0800
commit

881dc1d8a3167dc0269e9ecbd4ff5af9a89668a9

parent

636e01d8df67c86176562e1e5f67c98d6fe788b6

1 files changed, 11 insertions(+), 1 deletions(-)

jump to
M src/platform/qt/Window.cppsrc/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 } }