From 11cb2725b57e086f70d35f190eb713014879c7a5 Mon Sep 17 00:00:00 2001 From: "Zane.Y" Date: Sun, 6 Oct 2019 10:40:58 +0800 Subject: [PATCH] Update main.cpp --- CubeModLauncher/main.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/CubeModLauncher/main.cpp b/CubeModLauncher/main.cpp index bcd0c68..0a7c3fc 100644 --- a/CubeModLauncher/main.cpp +++ b/CubeModLauncher/main.cpp @@ -11,11 +11,11 @@ #define MODLOADER_CRC 0x39D18E98 -#define CUBE_EXECUTABLE "cubeworld.exe" +char* CUBE_EXECUTABLE = "cubeworld.exe"; using namespace std; -bool FileExists(const char* fileName) { +bool FileExists(char* fileName) { DWORD dwAttrib = GetFileAttributes(fileName); return (dwAttrib != INVALID_FILE_ATTRIBUTES && !(dwAttrib & FILE_ATTRIBUTE_DIRECTORY)); } @@ -31,6 +31,9 @@ int main(int argc, char** argv) { if (argc >= 2 && !strcmp(argv[1], "test")) { testMode = true; printf("Test mode enabled. CRC checks will be bypassed.\n"); + if (argc >= 3) { + CUBE_EXECUTABLE = argv[2]; + } } //Cube world is obviously required