all repos — mgba @ c9a38dbc7084e9677cc417245deed1c2b3ecdeb0

mGBA Game Boy Advance Emulator

Qt: Fix emulator crashing when full screen if a game is not running

Conflicts:
	CHANGES
Jeffrey Pfau jeffrey@endrift.com
Tue, 16 Dec 2014 22:12:22 -0800
commit

c9a38dbc7084e9677cc417245deed1c2b3ecdeb0

parent

5d2bb95ac4306f4772c56d36adc6d20fcb774bfd

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

jump to
M CHANGESCHANGES

@@ -1,6 +1,7 @@

0.1.1: (Future) Bugfixes: - Qt: Fix issue with set frame sizes being the wrong height + - Qt: Fix emulator crashing when full screen if a game is not running Misc: - Qt: Disable sync to video by default
M src/platform/qt/GameController.cppsrc/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.cppsrc/platform/qt/Window.cpp

@@ -284,7 +284,7 @@ menuBar()->show();

} else { showFullScreen(); #ifndef Q_OS_MAC - if (!m_controller->isPaused()) { + if (m_controller->isLoaded() && !m_controller->isPaused()) { menuBar()->hide(); } #endif

@@ -301,6 +301,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(); }