SDL/Qt: At least quit properly when switching backends

This commit is contained in:
Henrik Rydgård 2019-02-23 10:55:28 +01:00
parent 9b1d10063d
commit 24510b8187
2 changed files with 6 additions and 0 deletions

View File

@ -119,6 +119,9 @@ void System_SendMessage(const char *command, const char *parameter) {
QCoreApplication::postEvent(emugl, new QEvent((QEvent::Type)browseFileEvent));
} else if (!strcmp(command, "browse_folder")) {
QCoreApplication::postEvent(emugl, new QEvent((QEvent::Type)browseFolderEvent));
} else if (!strcmp(command, "graphics_restart")) {
// Should find a way to properly restart the app.
qApp->exit(0);
}
}

View File

@ -116,6 +116,9 @@ void System_SendMessage(const char *command, const char *parameter) {
} else if (!strcmp(command, "finish")) {
// Do a clean exit
g_QuitRequested = true;
} else if (!strcmp(command, "graphics_restart")) {
// Not sure how we best do this, but do a clean exit, better than being stuck in a bad state.
g_QuitRequested = true;
}
}