Skip to content

Commit 8261e6f

Browse files
committed
SDL/Qt: At least quit properly when switching backends
1 parent 863b636 commit 8261e6f

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

Qt/QtMain.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,9 @@ bool System_GetPropertyBool(SystemProperty prop) {
107107
void System_SendMessage(const char *command, const char *parameter) {
108108
if (!strcmp(command, "finish")) {
109109
qApp->exit(0);
110+
} else if (!strcmp(command, "graphics_restart")) {
111+
// Should find a way to properly restart the app.
112+
qApp->exit(0);
110113
}
111114
}
112115

SDL/SDLMain.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,9 @@ void System_SendMessage(const char *command, const char *parameter) {
116116
} else if (!strcmp(command, "finish")) {
117117
// Do a clean exit
118118
g_QuitRequested = true;
119+
} else if (!strcmp(command, "graphics_restart")) {
120+
// Not sure how we best do this, but do a clean exit, better than being stuck in a bad state.
121+
g_QuitRequested = true;
119122
}
120123
}
121124

0 commit comments

Comments
 (0)