1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-20 05:23:04 +01:00

Fix #9477: Fix process exit code always being zero

- Replaced gExitCode occurences with EXIT_SUCCESS and EXIT_FAILURE
- Removed global declaration of gExitCode
This commit is contained in:
Lomash Gupta
2019-10-05 15:26:55 -04:00
committed by Tulio Leao
parent 36840f3fe0
commit 0165261ac0
2 changed files with 14 additions and 8 deletions

View File

@@ -18,6 +18,7 @@ using namespace OpenRCT2;
*/
int main(int argc, const char** argv)
{
int32_t rc = EXIT_SUCCESS;
int runGame = cmdline_run(argv, argc);
core_init();
if (runGame == 1)
@@ -27,9 +28,11 @@ int main(int argc, const char** argv)
// Run OpenRCT2 with a plain context
auto context = CreateContext();
if((context->RunOpenRCT2(argc, argv)) == EXIT_SUCCESS) {
return EXIT_SUCCESS;
}
rc = context->RunOpenRCT2(argc, argv);
}
return EXIT_FAILURE;
else if (runGame == -1)
{
rc = EXIT_FAILURE;
}
return rc;
}