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

Conflicts:
	CHANGES
This commit is contained in:
Jeffrey Pfau 2014-12-16 22:12:22 -08:00
parent 5d2bb95ac4
commit c9a38dbc70
3 changed files with 11 additions and 1 deletions

View File

@ -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

View File

@ -208,6 +208,9 @@ void GameController::closeGame() {
}
bool GameController::isPaused() {
if (!m_gameOpen) {
return false;
}
return GBAThreadIsPaused(&m_threadContext);
}

View File

@ -284,7 +284,7 @@ void Window::toggleFullScreen() {
} else {
showFullScreen();
#ifndef Q_OS_MAC
if (!m_controller->isPaused()) {
if (m_controller->isLoaded() && !m_controller->isPaused()) {
menuBar()->hide();
}
#endif
@ -302,6 +302,12 @@ void Window::gameStarted(GBAThread* context) {
attachWidget(m_display);
m_screenWidget->setScaledContents(true);
#ifndef Q_OS_MAC
if(isFullScreen()) {
menuBar()->hide();
}
#endif
m_fpsTimer.start();
}