From abc889f5ecb1e536489c0ebaff90073434f6d425 Mon Sep 17 00:00:00 2001 From: admin Date: Sun, 22 Nov 2026 17:27:41 +0000 Subject: Initialize game command line before process-attach callbacks Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> --- runtime/src/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'runtime/src/main.cpp') diff --git a/runtime/src/main.cpp b/runtime/src/main.cpp index 06baae387..7bc2d78ab 100644 --- a/runtime/src/main.cpp +++ b/runtime/src/main.cpp @@ -94,6 +94,7 @@ int wmain(int argc, wchar_t** argv) { try { rt::Loader loader(game_dir); rt::Module& main_module = loader.load(image); // maps, binds and installs TLS; runs no image code + if (run) rt::process::set_command_line(image.filename().wstring(), game_args); if (init || run) { loader.initialise(); // TLS callbacks, then DllMain(DLL_PROCESS_ATTACH) for DLLs std::printf("%zu module(s) initialised\n", loader.modules().size()); @@ -128,7 +129,6 @@ int wmain(int argc, wchar_t** argv) { std::fprintf(stderr, "error: %s has no entry point\n", main_module.name.c_str()); return 1; } - rt::process::set_command_line(image.filename().wstring(), game_args); std::printf("console paths: GAME: -> %ls, writes -> %ls\n", game_dir.c_str(), overlay_dir.c_str()); std::printf("running %s\n", main_module.name.c_str()); std::fflush(stdout); -- cgit v1.2.3