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:
Diffstat (limited to 'runtime/src/main.cpp')
-rw-r--r--runtime/src/main.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/runtime/src/main.cpp b/runtime/src/main.cpp
index 71a5b44e1..c24fa0b1e 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"
@@ -101,6 +102,12 @@ int wmain(int argc, wchar_t** argv) {
101 if (image.empty()) return usage(); 102 if (image.empty()) return usage();
102 // Exactly one mode: --dry-run --run would otherwise initialise the modules and call the entry point. 103 // Exactly one mode: --dry-run --run would otherwise initialise the modules and call the entry point.
103 if (dry_run + init + run != 1) return usage(); 104 if (dry_run + init + run != 1) return usage();
105 // The game runs AVX code from its TLS callbacks on; without AVX that is a bare 0xC000001D (src/host_cpu.h).
106 if ((init || run) && !rt::host_cpu::check_skipped())
107 if (const auto missing = rt::host_cpu::missing_host_features(); !missing.empty()) {
108 std::fprintf(stderr, "%s\n", rt::host_cpu::message(missing).c_str());
109 return rt::host_cpu::kExitCode;
110 }
104 // The console folders are fixed once, as absolute paths. A bare image name (`gta6rt --run game.exe` from the 111 // The console folders are fixed once, as absolute paths. A bare image name (`gta6rt --run game.exe` from the
105 // game folder) has an empty parent path, which left GAME: with no root; and a relative --game-dir or --overlay 112 // game folder) has an empty parent path, which left GAME: with no root; and a relative --game-dir or --overlay
106 // would follow the title's later SetCurrentDirectory. If absolute() fails the path stays as given. 113 // would follow the title's later SetCurrentDirectory. If absolute() fails the path stays as given.