diff options
Diffstat (limited to 'runtime/src/main.cpp')
| -rw-r--r-- | runtime/src/main.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/runtime/src/main.cpp b/runtime/src/main.cpp index 491873fd1..fbb4b3043 100644 --- a/runtime/src/main.cpp +++ b/runtime/src/main.cpp | |||
| @@ -120,6 +120,15 @@ int wmain(int argc, wchar_t** argv) { | |||
| 120 | }; | 120 | }; |
| 121 | game_dir = game_dir.empty() ? absolute_or_same(image).parent_path() : absolute_or_same(game_dir); | 121 | game_dir = game_dir.empty() ? absolute_or_same(image).parent_path() : absolute_or_same(game_dir); |
| 122 | if (!overlay_dir.empty()) overlay_dir = absolute_or_same(overlay_dir); | 122 | if (!overlay_dir.empty()) overlay_dir = absolute_or_same(overlay_dir); |
| 123 | // LEONIDA_SHADERS too: the D3D12 device reads it at the title's first pipeline state, after it may have moved. | ||
| 124 | if (const DWORD size = GetEnvironmentVariableW(L"LEONIDA_SHADERS", nullptr, 0)) { | ||
| 125 | std::wstring shaders(size, L'\0'); | ||
| 126 | const DWORD n = GetEnvironmentVariableW(L"LEONIDA_SHADERS", shaders.data(), size); | ||
| 127 | if (n && n < size) { | ||
| 128 | shaders.resize(n); | ||
| 129 | SetEnvironmentVariableW(L"LEONIDA_SHADERS", absolute_or_same(shaders).c_str()); | ||
| 130 | } | ||
| 131 | } | ||
| 123 | // An image without relocations whose range this process already uses (arm64 Wine on macOS) runs in a new | 132 | // An image without relocations whose range this process already uses (arm64 Wine on macOS) runs in a new |
| 124 | // process that has the range reserved from the start (base_reservation.h); that process does not do this again. | 133 | // process that has the range reserved from the start (base_reservation.h); that process does not do this again. |
| 125 | if (!rt::base_reservation::inherited()) | 134 | if (!rt::base_reservation::inherited()) |