Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/ValveSoftware/Proton.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Gofman <pgofman@codeweavers.com>2022-07-28 20:21:18 +0300
committerArkadiusz Hiler <ahiler@codeweavers.com>2022-08-10 19:29:30 +0300
commit5e7036d566286c4b72d9388127ff23b1b55b4044 (patch)
tree373ee5133ada5e4c6fa81553cc50c16a6978cbfa
parentbcd3d5218f31998139415c624ccaab3bb53f029f (diff)
steam_helper: Also store PROTON_VR_RUNTIME in registry.
CW-Bug-Id: #21036
-rw-r--r--steam_helper/steam.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/steam_helper/steam.cpp b/steam_helper/steam.cpp
index ebf8c49d..eca32f5a 100644
--- a/steam_helper/steam.cpp
+++ b/steam_helper/steam.cpp
@@ -828,6 +828,7 @@ done:
static void setup_vr_registry(void)
{
+ WCHAR pathW[PATH_MAX];
LSTATUS status;
HANDLE thread;
HKEY vr_key;
@@ -846,6 +847,25 @@ static void setup_vr_registry(void)
return;
}
+ if(GetEnvironmentVariableW(L"PROTON_VR_RUNTIME", pathW, ARRAY_SIZE(pathW)))
+ {
+ if ((status = RegSetValueExW(vr_key, L"PROTON_VR_RUNTIME", 0, REG_SZ,
+ (BYTE *)pathW, (lstrlenW(pathW) + 1) * sizeof(WCHAR))))
+ {
+ WINE_ERR("Could not set PROTON_VR_RUNTIME value, status %#x.\n", status);
+ set_vr_status(vr_key, ~0u);
+ RegCloseKey(vr_key);
+ return;
+ }
+ }
+ else
+ {
+ WINE_TRACE("Linux OpenVR runtime is not available\n");
+ set_vr_status(vr_key, ~0u);
+ RegCloseKey(vr_key);
+ return;
+ }
+
if (!set_vr_status(vr_key, 0))
{
RegCloseKey(vr_key);