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.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/runtime/src/main.cpp b/runtime/src/main.cpp
index a870cb814..8e3767740 100644
--- a/runtime/src/main.cpp
+++ b/runtime/src/main.cpp
@@ -163,8 +163,11 @@ extern "C" __declspec(allocate(".CRT$XCT")) void(__cdecl* const gta6rt_reserve_t
163 163
164// Select the settings used to display the offline first-run UI. Keep explicit caller settings. 164// Select the settings used to display the offline first-run UI. Keep explicit caller settings.
165bool configure_first_run_ui(const std::filesystem::path& package, std::filesystem::path& overlay) { 165bool configure_first_run_ui(const std::filesystem::path& package, std::filesystem::path& overlay) {
166 // A variable that is set but empty is not a setting: Windows cannot hold one, but a caller on Wine can pass one
167 // (NAME= in the environment), and asking for the size alone reports it as present there.
166 const auto set_default = [](const wchar_t* name, const wchar_t* value) { 168 const auto set_default = [](const wchar_t* name, const wchar_t* value) {
167 return GetEnvironmentVariableW(name, nullptr, 0) != 0 || _wputenv_s(name, value) == 0; 169 wchar_t first[2]{};
170 return GetEnvironmentVariableW(name, first, 2) != 0 || _wputenv_s(name, value) == 0;
168 }; 171 };
169 const struct { const wchar_t* name; const wchar_t* value; } settings[] = { 172 const struct { const wchar_t* name; const wchar_t* value; } settings[] = {
170 {L"LEONIDA_D3D12", L"vulkan"}, {L"LEONIDA_ARENA_MB", L"2048"}, 173 {L"LEONIDA_D3D12", L"vulkan"}, {L"LEONIDA_ARENA_MB", L"2048"},