Qt: Fix emulator crashing when full screen if a game is not running
Jeffrey Pfau jeffrey@endrift.com
Tue, 16 Dec 2014 22:12:22 -0800
3 files changed,
11 insertions(+),
1 deletions(-)
M
src/platform/qt/GameController.cpp
→
src/platform/qt/GameController.cpp
@@ -208,6 +208,9 @@ emit gameStopped(&m_threadContext);
} bool GameController::isPaused() { + if (!m_gameOpen) { + return false; + } return GBAThreadIsPaused(&m_threadContext); }
M
src/platform/qt/Window.cpp
→
src/platform/qt/Window.cpp
@@ -285,7 +285,7 @@ menuBar()->show();
} else { showFullScreen(); #ifndef Q_OS_MAC - if (!m_controller->isPaused()) { + if (m_controller->isLoaded() && !m_controller->isPaused()) { menuBar()->hide(); } #endif@@ -302,6 +302,12 @@ GBAGetGameTitle(context->gba, title);
setWindowTitle(tr(PROJECT_NAME " - %1").arg(title)); attachWidget(m_display); m_screenWidget->setScaledContents(true); + +#ifndef Q_OS_MAC + if(isFullScreen()) { + menuBar()->hide(); + } +#endif m_fpsTimer.start(); }