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 71a5b44e1..a3d0996dc 100644 --- a/runtime/src/main.cpp +++ b/runtime/src/main.cpp | |||
| @@ -111,6 +111,15 @@ int wmain(int argc, wchar_t** argv) { | |||
| 111 | }; | 111 | }; |
| 112 | game_dir = game_dir.empty() ? absolute_or_same(image).parent_path() : absolute_or_same(game_dir); | 112 | game_dir = game_dir.empty() ? absolute_or_same(image).parent_path() : absolute_or_same(game_dir); |
| 113 | if (!overlay_dir.empty()) overlay_dir = absolute_or_same(overlay_dir); | 113 | if (!overlay_dir.empty()) overlay_dir = absolute_or_same(overlay_dir); |
| 114 | // LEONIDA_SHADERS too: the D3D12 device reads it at the title's first pipeline state, after it may have moved. | ||
| 115 | if (const DWORD size = GetEnvironmentVariableW(L"LEONIDA_SHADERS", nullptr, 0)) { | ||
| 116 | std::wstring shaders(size, L'\0'); | ||
| 117 | const DWORD n = GetEnvironmentVariableW(L"LEONIDA_SHADERS", shaders.data(), size); | ||
| 118 | if (n && n < size) { | ||
| 119 | shaders.resize(n); | ||
| 120 | SetEnvironmentVariableW(L"LEONIDA_SHADERS", absolute_or_same(shaders).c_str()); | ||
| 121 | } | ||
| 122 | } | ||
| 114 | // An image without relocations whose range this process already uses (arm64 Wine on macOS) runs in a new | 123 | // An image without relocations whose range this process already uses (arm64 Wine on macOS) runs in a new |
| 115 | // process that has the range reserved from the start (base_reservation.h); that process does not do this again. | 124 | // process that has the range reserved from the start (base_reservation.h); that process does not do this again. |
| 116 | if (!rt::base_reservation::inherited()) | 125 | if (!rt::base_reservation::inherited()) |