mirror of https://github.com/mgba-emu/mgba.git
Qt: Fix emulator crashing when full screen if a game is not running
Conflicts: CHANGES
This commit is contained in:
parent
5d2bb95ac4
commit
c9a38dbc70
1
CHANGES
1
CHANGES
|
@ -1,6 +1,7 @@
|
||||||
0.1.1: (Future)
|
0.1.1: (Future)
|
||||||
Bugfixes:
|
Bugfixes:
|
||||||
- Qt: Fix issue with set frame sizes being the wrong height
|
- 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:
|
Misc:
|
||||||
- Qt: Disable sync to video by default
|
- Qt: Disable sync to video by default
|
||||||
|
|
||||||
|
|
|
@ -208,6 +208,9 @@ void GameController::closeGame() {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool GameController::isPaused() {
|
bool GameController::isPaused() {
|
||||||
|
if (!m_gameOpen) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
return GBAThreadIsPaused(&m_threadContext);
|
return GBAThreadIsPaused(&m_threadContext);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -284,7 +284,7 @@ void Window::toggleFullScreen() {
|
||||||
} else {
|
} else {
|
||||||
showFullScreen();
|
showFullScreen();
|
||||||
#ifndef Q_OS_MAC
|
#ifndef Q_OS_MAC
|
||||||
if (!m_controller->isPaused()) {
|
if (m_controller->isLoaded() && !m_controller->isPaused()) {
|
||||||
menuBar()->hide();
|
menuBar()->hide();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -302,6 +302,12 @@ void Window::gameStarted(GBAThread* context) {
|
||||||
attachWidget(m_display);
|
attachWidget(m_display);
|
||||||
m_screenWidget->setScaledContents(true);
|
m_screenWidget->setScaledContents(true);
|
||||||
|
|
||||||
|
#ifndef Q_OS_MAC
|
||||||
|
if(isFullScreen()) {
|
||||||
|
menuBar()->hide();
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
m_fpsTimer.start();
|
m_fpsTimer.start();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue