upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/runtime/src/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/src/main.cpp')
-rw-r--r--runtime/src/main.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/runtime/src/main.cpp b/runtime/src/main.cpp
index 6229ad210..77c1899f8 100644
--- a/runtime/src/main.cpp
+++ b/runtime/src/main.cpp
@@ -94,6 +94,7 @@ int wmain(int argc, wchar_t** argv) {
94 try { 94 try {
95 rt::Loader loader(game_dir); 95 rt::Loader loader(game_dir);
96 rt::Module& main_module = loader.load(image); // maps, binds and installs TLS; runs no image code 96 rt::Module& main_module = loader.load(image); // maps, binds and installs TLS; runs no image code
97 if (run) rt::process::set_command_line(image.filename().wstring(), game_args);
97 if (init || run) { 98 if (init || run) {
98 loader.initialise(); // TLS callbacks, then DllMain(DLL_PROCESS_ATTACH) for DLLs 99 loader.initialise(); // TLS callbacks, then DllMain(DLL_PROCESS_ATTACH) for DLLs
99 std::printf("%zu module(s) initialised\n", loader.modules().size()); 100 std::printf("%zu module(s) initialised\n", loader.modules().size());
@@ -128,7 +129,6 @@ int wmain(int argc, wchar_t** argv) {
128 std::fprintf(stderr, "error: %s has no entry point\n", main_module.name.c_str()); 129 std::fprintf(stderr, "error: %s has no entry point\n", main_module.name.c_str());
129 return 1; 130 return 1;
130 } 131 }
131 rt::process::set_command_line(image.filename().wstring(), game_args);
132 const std::wstring paths = L"console paths: GAME: -> " + game_dir.native() + L", writes -> " + overlay_dir.native(); 132 const std::wstring paths = L"console paths: GAME: -> " + game_dir.native() + L", writes -> " + overlay_dir.native();
133 const HANDLE out = GetStdHandle(STD_OUTPUT_HANDLE); 133 const HANDLE out = GetStdHandle(STD_OUTPUT_HANDLE);
134 DWORD mode; 134 DWORD mode;