mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-21 22:13:07 +01:00
Use EXITCODE enum on game startup
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user