You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
Fix Godot exiting with unexpected failure code
The exit code is initialized as EXIT_FAILURE to indicate failures during startup. Closing the Game window via the window manager does not change the exit code, so the program exists with EXIT_FAILURE. This PR set the exit code to EXIT_SUCCESS when initialization was successful just before starting the main loop.
This commit is contained in:
@@ -69,6 +69,7 @@ int main(int argc, char *argv[]) {
|
||||
}
|
||||
|
||||
if (Main::start()) {
|
||||
os.set_exit_code(EXIT_SUCCESS);
|
||||
os.run(); // it is actually the OS that decides how to run
|
||||
}
|
||||
Main::cleanup();
|
||||
|
||||
Reference in New Issue
Block a user