diff options
Diffstat (limited to 'runtime/src/main.cpp')
| -rw-r--r-- | runtime/src/main.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/runtime/src/main.cpp b/runtime/src/main.cpp index 9ceccf53a..475ae6ec7 100644 --- a/runtime/src/main.cpp +++ b/runtime/src/main.cpp | |||
| @@ -20,6 +20,7 @@ | |||
| 20 | #include <string> | 20 | #include <string> |
| 21 | #include <vector> | 21 | #include <vector> |
| 22 | 22 | ||
| 23 | #include "base_reservation.h" | ||
| 23 | #include "pe_loader.h" | 24 | #include "pe_loader.h" |
| 24 | #include "../shims/d3d12_trace.h" | 25 | #include "../shims/d3d12_trace.h" |
| 25 | #include "../shims/process_shim.h" | 26 | #include "../shims/process_shim.h" |
| @@ -68,6 +69,10 @@ int wmain(int argc, wchar_t** argv) { | |||
| 68 | // Exactly one mode: --dry-run --run would otherwise initialise the modules and call the entry point. | 69 | // Exactly one mode: --dry-run --run would otherwise initialise the modules and call the entry point. |
| 69 | if (dry_run + init + run != 1) return usage(); | 70 | if (dry_run + init + run != 1) return usage(); |
| 70 | if (game_dir.empty()) game_dir = image.parent_path(); | 71 | if (game_dir.empty()) game_dir = image.parent_path(); |
| 72 | // An image without relocations whose range this process already uses (arm64 Wine on macOS) runs in a new | ||
| 73 | // process that has the range reserved from the start (base_reservation.h); that process does not do this again. | ||
| 74 | if (!rt::base_reservation::inherited()) | ||
| 75 | if (const auto range = rt::base_reservation::needed(image)) return rt::base_reservation::relaunch(*range); | ||
| 71 | rt::d3d12_trace::set_enabled(trace_d3d12); | 76 | rt::d3d12_trace::set_enabled(trace_d3d12); |
| 72 | 77 | ||
| 73 | try { | 78 | try { |