diff options
| author | Jan Trencansky <jan.trencansky@protonmail.com> | 2026-11-25 18:18:55 -0500 |
|---|---|---|
| committer | Jan Trencansky <jan.trencansky@protonmail.com> | 2026-11-25 18:18:55 -0500 |
| commit | d4fb292344088e7925ddeb3bbceb5a9ac46de8c2 (patch) | |
| tree | 551a4e8b93953b3b481b3a30739ca73eb45615e8 /runtime/src/main.cpp | |
| parent | 244387529b6fb4992b601704d32016e7beeadd28 (diff) | |
| parent | ffcfe68f12891826a2b15e19f31149d8bb44e778 (diff) | |
Merge main into rt-title-hud-vram-budget
Brings in #2137 (LEONIDA_DEV_OVERLAY), which the next commit extends.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'runtime/src/main.cpp')
| -rw-r--r-- | runtime/src/main.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/runtime/src/main.cpp b/runtime/src/main.cpp index 094aaa321..1b55264fb 100644 --- a/runtime/src/main.cpp +++ b/runtime/src/main.cpp | |||
| @@ -149,6 +149,7 @@ void start_title_peek(std::uint8_t* base) { | |||
| 149 | #include "mods.h" | 149 | #include "mods.h" |
| 150 | #include "pe_loader.h" | 150 | #include "pe_loader.h" |
| 151 | #include "thread_stacks.h" | 151 | #include "thread_stacks.h" |
| 152 | #include "dev_overlay.h" | ||
| 152 | #include "thread_sampler.h" | 153 | #include "thread_sampler.h" |
| 153 | #include "title_page_watch.h" | 154 | #include "title_page_watch.h" |
| 154 | #include "title_geometry_watch.h" | 155 | #include "title_geometry_watch.h" |
| @@ -541,7 +542,9 @@ int wmain(int argc, wchar_t** argv) { | |||
| 541 | std::fprintf(stderr, "error: %s has no entry point\n", main_module.name.c_str()); | 542 | std::fprintf(stderr, "error: %s has no entry point\n", main_module.name.c_str()); |
| 542 | return 1; | 543 | return 1; |
| 543 | } | 544 | } |
| 544 | const std::wstring paths = L"console paths: GAME: -> " + game_dir.native() + L", writes -> " + overlay_dir.native(); | 545 | const std::filesystem::path scratch_dir = rt::fs::scratch_dir(); |
| 546 | const std::wstring paths = L"console paths: GAME: -> " + game_dir.native() + L", writes -> " + | ||
| 547 | overlay_dir.native() + L", T: -> " + scratch_dir.native(); | ||
| 545 | const HANDLE out = GetStdHandle(STD_OUTPUT_HANDLE); | 548 | const HANDLE out = GetStdHandle(STD_OUTPUT_HANDLE); |
| 546 | DWORD mode; | 549 | DWORD mode; |
| 547 | bool printed = false; | 550 | bool printed = false; |
| @@ -554,13 +557,16 @@ int wmain(int argc, wchar_t** argv) { | |||
| 554 | if (!printed) { | 557 | if (!printed) { |
| 555 | const auto game = game_dir.u8string(); | 558 | const auto game = game_dir.u8string(); |
| 556 | const auto overlay = overlay_dir.u8string(); | 559 | const auto overlay = overlay_dir.u8string(); |
| 557 | std::printf("console paths: GAME: -> %s, writes -> %s\n", | 560 | const auto scratch = scratch_dir.u8string(); |
| 558 | reinterpret_cast<const char*>(game.c_str()), reinterpret_cast<const char*>(overlay.c_str())); | 561 | std::printf("console paths: GAME: -> %s, writes -> %s, T: -> %s\n", |
| 562 | reinterpret_cast<const char*>(game.c_str()), reinterpret_cast<const char*>(overlay.c_str()), | ||
| 563 | reinterpret_cast<const char*>(scratch.c_str())); | ||
| 559 | } | 564 | } |
| 560 | std::printf("running %s\n", main_module.name.c_str()); | 565 | std::printf("running %s\n", main_module.name.c_str()); |
| 561 | std::fflush(stdout); | 566 | std::fflush(stdout); |
| 562 | keep_title_watchdog_kicked(main_module.base); | 567 | keep_title_watchdog_kicked(main_module.base); |
| 563 | start_title_peek(main_module.base); | 568 | start_title_peek(main_module.base); |
| 569 | leonida::dev_overlay::start(); // LEONIDA_DEV_OVERLAY=1 | ||
| 564 | leonida::thread_sampler::start(main_module.base, main_module.size); // LEONIDA_SAMPLE_MS (diagnostic) | 570 | leonida::thread_sampler::start(main_module.base, main_module.size); // LEONIDA_SAMPLE_MS (diagnostic) |
| 565 | #ifdef LEONIDA_VULKAN_DEVICE | 571 | #ifdef LEONIDA_VULKAN_DEVICE |
| 566 | SetConsoleCtrlHandler(&stop_compiles_on_console_exit, TRUE); | 572 | SetConsoleCtrlHandler(&stop_compiles_on_console_exit, TRUE); |