diff options
Diffstat (limited to 'runtime/src/main.cpp')
| -rw-r--r-- | runtime/src/main.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/runtime/src/main.cpp b/runtime/src/main.cpp index 71a5b44e1..39b362a01 100644 --- a/runtime/src/main.cpp +++ b/runtime/src/main.cpp | |||
| @@ -32,10 +32,12 @@ | |||
| 32 | #include "mods.h" | 32 | #include "mods.h" |
| 33 | #include "pe_loader.h" | 33 | #include "pe_loader.h" |
| 34 | #include "../shims/d3d12_trace.h" | 34 | #include "../shims/d3d12_trace.h" |
| 35 | #include "../shims/d3d12_xs_device.h" | ||
| 35 | #include "../shims/file_system.h" | 36 | #include "../shims/file_system.h" |
| 36 | #include "../shims/process_shim.h" | 37 | #include "../shims/process_shim.h" |
| 37 | #include "../shims/shims.h" | 38 | #include "../shims/shims.h" |
| 38 | #include "../shims/startup_trace.h" | 39 | #include "../shims/startup_trace.h" |
| 40 | #include "../shims/xmem.h" | ||
| 39 | 41 | ||
| 40 | namespace { | 42 | namespace { |
| 41 | 43 | ||
| @@ -147,6 +149,8 @@ int wmain(int argc, wchar_t** argv) { | |||
| 147 | "this executable (docs/modding.md)\n", leonida::mods::active().size()); | 149 | "this executable (docs/modding.md)\n", leonida::mods::active().size()); |
| 148 | } | 150 | } |
| 149 | rt::d3d12_trace::set_enabled(trace_d3d12); | 151 | rt::d3d12_trace::set_enabled(trace_d3d12); |
| 152 | // Slot 133 imports the title's pages; xmem commits them on first touch, so they are committed first. | ||
| 153 | rt::d3d12_xs::set_placed_at_va_pages_hook(&rt::xmem::commit_physical_range); | ||
| 150 | if (int trace_error = 0; !trace_file.empty() && !rt::startup_trace::open(trace_file.c_str(), &trace_error)) { | 154 | if (int trace_error = 0; !trace_file.empty() && !rt::startup_trace::open(trace_file.c_str(), &trace_error)) { |
| 151 | std::fprintf(stderr, trace_error == EEXIST ? "error: the trace file already exists; --trace only creates a new file\n" | 155 | std::fprintf(stderr, trace_error == EEXIST ? "error: the trace file already exists; --trace only creates a new file\n" |
| 152 | : "error: cannot create the trace file\n"); | 156 | : "error: cannot create the trace file\n"); |