diff options
| author | ItsNotRexed <300290919+ItsNotRexed@users.noreply.github.com> | 2026-11-23 17:29:12 -0500 |
|---|---|---|
| committer | ItsNotRexed <300290919+ItsNotRexed@users.noreply.github.com> | 2026-11-23 17:29:12 -0500 |
| commit | f7b3afcda95b5689a57e17e30acbd77148b104d1 (patch) | |
| tree | a99c4d12b8a4645ff1183c02d0e9b9b36816c3d9 /runtime/src/main.cpp | |
| parent | db1d454ce7d7051102417c1a5ce8b19d0599fcb1 (diff) | |
| parent | ad6e5d6bbee5bd8c3c8a7e95216f12038fe3db22 (diff) | |
Merge remote-tracking branch 'origin/pr/9754'
# Conflicts:
# scripts/build_runtime.ps1
Diffstat (limited to 'runtime/src/main.cpp')
| -rw-r--r-- | runtime/src/main.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/runtime/src/main.cpp b/runtime/src/main.cpp index 39b362a01..491873fd1 100644 --- a/runtime/src/main.cpp +++ b/runtime/src/main.cpp | |||
| @@ -29,6 +29,7 @@ | |||
| 29 | 29 | ||
| 30 | #include "base_reservation.h" | 30 | #include "base_reservation.h" |
| 31 | #include "code_hooks.h" | 31 | #include "code_hooks.h" |
| 32 | #include "host_cpu.h" | ||
| 32 | #include "mods.h" | 33 | #include "mods.h" |
| 33 | #include "pe_loader.h" | 34 | #include "pe_loader.h" |
| 34 | #include "../shims/d3d12_trace.h" | 35 | #include "../shims/d3d12_trace.h" |
| @@ -103,6 +104,12 @@ int wmain(int argc, wchar_t** argv) { | |||
| 103 | if (image.empty()) return usage(); | 104 | if (image.empty()) return usage(); |
| 104 | // Exactly one mode: --dry-run --run would otherwise initialise the modules and call the entry point. | 105 | // Exactly one mode: --dry-run --run would otherwise initialise the modules and call the entry point. |
| 105 | if (dry_run + init + run != 1) return usage(); | 106 | if (dry_run + init + run != 1) return usage(); |
| 107 | // The game runs AVX code from its TLS callbacks on; without AVX that is a bare 0xC000001D (src/host_cpu.h). | ||
| 108 | if ((init || run) && !rt::host_cpu::check_skipped()) | ||
| 109 | if (const auto missing = rt::host_cpu::missing_host_features(); !missing.empty()) { | ||
| 110 | std::fprintf(stderr, "%s\n", rt::host_cpu::message(missing).c_str()); | ||
| 111 | return rt::host_cpu::kExitCode; | ||
| 112 | } | ||
| 106 | // The console folders are fixed once, as absolute paths. A bare image name (`gta6rt --run game.exe` from the | 113 | // The console folders are fixed once, as absolute paths. A bare image name (`gta6rt --run game.exe` from the |
| 107 | // game folder) has an empty parent path, which left GAME: with no root; and a relative --game-dir or --overlay | 114 | // game folder) has an empty parent path, which left GAME: with no root; and a relative --game-dir or --overlay |
| 108 | // would follow the title's later SetCurrentDirectory. If absolute() fails the path stays as given. | 115 | // would follow the title's later SetCurrentDirectory. If absolute() fails the path stays as given. |