Use EXITCODE enum on game startup

This commit is contained in:
Tulio Leao committed 2020-01-19 19:37:27 -03:00
1 parent 0165261ac0
commit c87e1ff9b6
2 files changed
+6 -4

No files matched your search

+3 -2
View File
@@ -9,6 +9,7 @@
#include <openrct2/Context.h>
#include <openrct2/OpenRCT2.h>
#include <openrct2/cmdline/CommandLine.hpp>
#include <openrct2/platform/platform.h>
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;
}
+3 -2
View File
@@ -17,6 +17,7 @@
#include <openrct2/OpenRCT2.h>
#include <openrct2/PlatformEnvironment.h>
#include <openrct2/audio/AudioContext.h>
#include <openrct2/cmdline/CommandLine.hpp>
#include <openrct2/platform/platform.h>
#include <openrct2/ui/UiContext.h>
@@ -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;
}