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:
authorItsNotRexed <300290919+ItsNotRexed@users.noreply.github.com>2026-11-22 15:16:49 -0500
committerItsNotRexed <300290919+ItsNotRexed@users.noreply.github.com>2026-11-22 15:16:49 -0500
commitc2e575649b25e87b4699c5db3f7f3ad065a885dc (patch)
tree328f543ff5f2c4747538324858ca3bee411a4e7e /runtime/src/main.cpp
parent96b6bbf810e942ecfb8be35429fb1e70b0266f0e (diff)
parente421765b40c8b7a13b47abe2022875c28f8dcfd7 (diff)
Merge pull request #3303 from Doffi4
Diffstat (limited to 'runtime/src/main.cpp')
-rw-r--r--runtime/src/main.cpp17
1 files changed, 16 insertions, 1 deletions
diff --git a/runtime/src/main.cpp b/runtime/src/main.cpp
index 4ee522b47..49917bf18 100644
--- a/runtime/src/main.cpp
+++ b/runtime/src/main.cpp
@@ -140,7 +140,22 @@ int wmain(int argc, wchar_t** argv) {
140 std::fprintf(stderr, "error: %s has no entry point\n", main_module.name.c_str()); 140 std::fprintf(stderr, "error: %s has no entry point\n", main_module.name.c_str());
141 return 1; 141 return 1;
142 } 142 }
143 std::printf("console paths: GAME: -> %ls, writes -> %ls\n", game_dir.c_str(), overlay_dir.c_str()); 143 const std::wstring paths = L"console paths: GAME: -> " + game_dir.native() + L", writes -> " + overlay_dir.native();
144 const HANDLE out = GetStdHandle(STD_OUTPUT_HANDLE);
145 DWORD mode;
146 bool printed = false;
147 if (GetConsoleMode(out, &mode)) {
148 std::fflush(stdout);
149 const std::wstring line = paths + L"\r\n";
150 DWORD written;
151 printed = WriteConsoleW(out, line.data(), static_cast<DWORD>(line.size()), &written, nullptr) != FALSE;
152 }
153 if (!printed) {
154 const auto game = game_dir.u8string();
155 const auto overlay = overlay_dir.u8string();
156 std::printf("console paths: GAME: -> %s, writes -> %s\n",
157 reinterpret_cast<const char*>(game.c_str()), reinterpret_cast<const char*>(overlay.c_str()));
158 }
144 std::printf("running %s\n", main_module.name.c_str()); 159 std::printf("running %s\n", main_module.name.c_str());
145 std::fflush(stdout); 160 std::fflush(stdout);
146 const int code = rt::process::run_entry(main_module.base + main_module.entry_rva); 161 const int code = rt::process::run_entry(main_module.base + main_module.entry_rva);