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)
|
||||
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
|
||||
|
||||
|
|
|
@ -208,6 +208,9 @@ void GameController::closeGame() {
|
|||
}
|
||||
|
||||
bool GameController::isPaused() {
|
||||
if (!m_gameOpen) {
|
||||
return false;
|
||||
}
|
||||
return GBAThreadIsPaused(&m_threadContext);
|
||||
}
|
||||
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue