Skip to content

Commit

Permalink
[#11] Renamed the --legacy parameter to match the original specificat…
Browse files Browse the repository at this point in the history
…ion.
  • Loading branch information
DaloLorn authored Jan 7, 2025
1 parent 2075683 commit 1b24901
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions StarRuler2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 2 additions & 2 deletions source/loader/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 1b24901

Please sign in to comment.