From 1b24901a84afa58b533aaec376c47d1c090fb03d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Neven=20Pra=C5=A1nikar?= Date: Tue, 7 Jan 2025 16:28:23 +0100 Subject: [PATCH] [#11] Renamed the --legacy parameter to match the original specification. --- StarRuler2.sh | 4 ++-- source/loader/main.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/StarRuler2.sh b/StarRuler2.sh index aeb3e1c5..67b87c83 100755 --- a/StarRuler2.sh +++ b/StarRuler2.sh @@ -7,10 +7,10 @@ else fi cd "$(dirname "$script_loc")" -# TODO: Strip out --legacy parameter before passing args to the game. +# TODO: Strip out --useLegacyBinaries parameter before passing args to the game. # It's ugly, but as with the C equivalent, I'm not quite comfortable enough # with Bash to be comfortable trying it myself. --Dalo -if [[ $ == *--legacy* ]]; then +if [[ $ == *--useLegacyBinaries* ]]; then bin_folder="bin_legacy" else bin_folder="bin" diff --git a/source/loader/main.c b/source/loader/main.c index 0ee40456..38a487fc 100644 --- a/source/loader/main.c +++ b/source/loader/main.c @@ -38,12 +38,12 @@ DWORD __stdcall mainCRTStartup(LPVOID p) { wchar_t path; - if(strstr(cmdline, "--legacy")) + if(strstr(cmdline, "--useLegacyBinaries")) path = L"bin_legacy\\win64\\Star Ruler 2.exe"; else path = L"bin\\win64\\Star Ruler 2.exe"; - // TODO: Don't pass -legacy parameter to game client. + // TODO: Don't pass --useLegacyBinaries parameter to game client. // It's ugly, but I'm not quite C-savvy enough to be comfortable // writing - or more likely copy-pasting - a substring remover... --Dalo if(CreateProcessW(path, wstrdup(cmdline), NULL, NULL, FALSE, DETACHED_PROCESS, NULL, NULL, &startup, &process) != FALSE) {