Skip to content

Commit

Permalink
SDL/Qt: At least quit properly when switching backends
Browse files Browse the repository at this point in the history
  • Loading branch information
hrydgard committed Oct 6, 2018
1 parent 863b636 commit 8261e6f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Qt/QtMain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,9 @@ bool System_GetPropertyBool(SystemProperty prop) {
void System_SendMessage(const char *command, const char *parameter) {
if (!strcmp(command, "finish")) {
qApp->exit(0);
} else if (!strcmp(command, "graphics_restart")) {
// Should find a way to properly restart the app.
qApp->exit(0);
}
}

Expand Down
3 changes: 3 additions & 0 deletions SDL/SDLMain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}

Expand Down

0 comments on commit 8261e6f

Please sign in to comment.