diff options
author | Markus Sauermann <6299227+Sauermann@users.noreply.github.com> | 2022-10-15 03:17:40 +0200 |
---|---|---|
committer | Markus Sauermann <6299227+Sauermann@users.noreply.github.com> | 2022-10-15 03:17:40 +0200 |
commit | 7d59a14db83bf8622cf4006ebd1d0b279a909f3d (patch) | |
tree | c215c5900a44f2030b99a3fd2265b34b8dceff87 | |
parent | 39534a7aecc4ca4215af67244b23dda09ea339f8 (diff) |
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.
-rw-r--r-- | platform/linuxbsd/godot_linuxbsd.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/platform/linuxbsd/godot_linuxbsd.cpp b/platform/linuxbsd/godot_linuxbsd.cpp index 91a260182e..fa5e20891c 100644 --- a/platform/linuxbsd/godot_linuxbsd.cpp +++ b/platform/linuxbsd/godot_linuxbsd.cpp @@ -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(); |