From c87e1ff9b6049f2bb0650106f5b3b33553352b8f Mon Sep 17 00:00:00 2001 From: Tulio Leao Date: Sun, 19 Jan 2020 18:48:50 -0300 Subject: [PATCH] Use EXITCODE enum on game startup --- src/openrct2-cli/Cli.cpp | 5 +++-- src/openrct2-ui/Ui.cpp | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/openrct2-cli/Cli.cpp b/src/openrct2-cli/Cli.cpp index 69b0b55f10..6491a2d2b7 100644 --- a/src/openrct2-cli/Cli.cpp +++ b/src/openrct2-cli/Cli.cpp @@ -9,6 +9,7 @@ #include #include +#include #include using namespace OpenRCT2; @@ -21,7 +22,7 @@ int main(int argc, const char** argv) int32_t rc = EXIT_SUCCESS; int runGame = cmdline_run(argv, argc); core_init(); - if (runGame == 1) + if (runGame == EXITCODE_CONTINUE) { gOpenRCT2Headless = true; gOpenRCT2NoGraphics = true; @@ -30,7 +31,7 @@ int main(int argc, const char** argv) auto context = CreateContext(); rc = context->RunOpenRCT2(argc, argv); } - else if (runGame == -1) + else if (runGame == EXITCODE_FAIL) { rc = EXIT_FAILURE; } diff --git a/src/openrct2-ui/Ui.cpp b/src/openrct2-ui/Ui.cpp index c3fc9324c7..ebd5bf2478 100644 --- a/src/openrct2-ui/Ui.cpp +++ b/src/openrct2-ui/Ui.cpp @@ -17,6 +17,7 @@ #include #include #include +#include #include #include @@ -43,7 +44,7 @@ int main(int argc, const char** argv) int runGame = cmdline_run(argv, argc); core_init(); RegisterBitmapReader(); - if (runGame == 1) + if (runGame == EXITCODE_CONTINUE) { if (gOpenRCT2Headless) { @@ -60,7 +61,7 @@ int main(int argc, const char** argv) } rc = context->RunOpenRCT2(argc, argv); } - else if (runGame == -1) + else if (runGame == EXITCODE_FAIL) { rc = EXIT_FAILURE; }