소스 검색

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.
Markus Sauermann 2 년 전
부모
커밋
7d59a14db8
1개의 변경된 파일1개의 추가작업 그리고 0개의 파일을 삭제
  1. 1 0
      platform/linuxbsd/godot_linuxbsd.cpp

+ 1 - 0
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();