From 881dc1d8a3167dc0269e9ecbd4ff5af9a89668a9 Mon Sep 17 00:00:00 2001 From: Jeffrey Pfau Date: Sat, 22 Nov 2014 02:10:50 -0800 Subject: [PATCH] Qt: Always show menu bar when paused, even in full screen --- src/platform/qt/Window.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/platform/qt/Window.cpp b/src/platform/qt/Window.cpp index 421af7cb3..c9e4bdc7f 100644 --- a/src/platform/qt/Window.cpp +++ b/src/platform/qt/Window.cpp @@ -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 } }