mirror of https://github.com/mgba-emu/mgba.git
Qt: Fix race condition when a game crashes immediately
Conflicts: src/platform/qt/Window.cpp
This commit is contained in:
parent
1bd24145e6
commit
d99a58a857
1
CHANGES
1
CHANGES
|
@ -23,6 +23,7 @@ Bugfixes:
|
||||||
- GBA Video: Fix sprite boundary conditions with mosaic
|
- GBA Video: Fix sprite boundary conditions with mosaic
|
||||||
- Video: Fix FFmpeg crashing when the file extension is wrong
|
- Video: Fix FFmpeg crashing when the file extension is wrong
|
||||||
- GBA Audio: Fix GB audio channels being too quiet (fixes #159)
|
- GBA Audio: Fix GB audio channels being too quiet (fixes #159)
|
||||||
|
- Qt: Fix a race condition when a game crashes immediately
|
||||||
Misc:
|
Misc:
|
||||||
- Qt: Disable sync to video by default
|
- Qt: Disable sync to video by default
|
||||||
- GBA: Exit cleanly on FATAL if the port supports it
|
- GBA: Exit cleanly on FATAL if the port supports it
|
||||||
|
|
|
@ -300,12 +300,19 @@ void Window::toggleFullScreen() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void Window::gameStarted(GBAThread* context) {
|
void Window::gameStarted(GBAThread* context) {
|
||||||
|
char title[13] = { '\0' };
|
||||||
|
MutexLock(&context->stateMutex);
|
||||||
|
if (context->state < THREAD_EXITING) {
|
||||||
emit startDrawing(m_controller->drawContext(), context);
|
emit startDrawing(m_controller->drawContext(), context);
|
||||||
|
GBAGetGameTitle(context->gba, title);
|
||||||
|
} else {
|
||||||
|
MutexUnlock(&context->stateMutex);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
MutexUnlock(&context->stateMutex);
|
||||||
foreach (QAction* action, m_gameActions) {
|
foreach (QAction* action, m_gameActions) {
|
||||||
action->setDisabled(false);
|
action->setDisabled(false);
|
||||||
}
|
}
|
||||||
char title[13] = { '\0' };
|
|
||||||
GBAGetGameTitle(context->gba, title);
|
|
||||||
setWindowTitle(tr(PROJECT_NAME " - %1").arg(title));
|
setWindowTitle(tr(PROJECT_NAME " - %1").arg(title));
|
||||||
attachWidget(m_display);
|
attachWidget(m_display);
|
||||||
m_screenWidget->setScaledContents(true);
|
m_screenWidget->setScaledContents(true);
|
||||||
|
|
Loading…
Reference in New Issue