summaryrefslogtreecommitdiffstats
path: root/platform/windows/godot_windows.cpp
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2024-03-24 01:15:06 +0100
committerRémi Verschelde <rverschelde@gmail.com>2024-03-24 01:15:06 +0100
commitf49efbe0e58594260b768aaa9394abdc16122754 (patch)
treed151ce86175df004d0b6b7dff9e9e5ef7311cc7e /platform/windows/godot_windows.cpp
parentcd4e4c0fccfdbfe04d91617a1bc6c4785dd6a1ec (diff)
parent023dcd44c1e628bb654b5472418d6a346b510a71 (diff)
downloadredot-engine-f49efbe0e58594260b768aaa9394abdc16122754.tar.gz
Merge pull request #89229 from akien-mga/main-refactor-os-exit-code
Refactor OS exit code to be `EXIT_SUCCESS` by default
Diffstat (limited to 'platform/windows/godot_windows.cpp')
-rw-r--r--platform/windows/godot_windows.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/platform/windows/godot_windows.cpp b/platform/windows/godot_windows.cpp
index f86ecd87fb..5f41b4e568 100644
--- a/platform/windows/godot_windows.cpp
+++ b/platform/windows/godot_windows.cpp
@@ -171,13 +171,15 @@ int widechar_main(int argc, wchar_t **argv) {
delete[] argv_utf8;
if (err == ERR_HELP) { // Returned by --help and --version, so success.
- return 0;
+ return EXIT_SUCCESS;
}
- return 255;
+ return EXIT_FAILURE;
}
- if (Main::start()) {
+ if (Main::start() == EXIT_SUCCESS) {
os.run();
+ } else {
+ os.set_exit_code(EXIT_FAILURE);
}
Main::cleanup();