mirror of
https://github.com/ValveSoftware/Proton.git
synced 2024-12-26 14:45:48 +03:00
steam_helper: Also store PROTON_VR_RUNTIME in registry.
CW-Bug-Id: #21036
This commit is contained in:
parent
bcd3d5218f
commit
5e7036d566
@ -828,6 +828,7 @@ done:
|
|||||||
|
|
||||||
static void setup_vr_registry(void)
|
static void setup_vr_registry(void)
|
||||||
{
|
{
|
||||||
|
WCHAR pathW[PATH_MAX];
|
||||||
LSTATUS status;
|
LSTATUS status;
|
||||||
HANDLE thread;
|
HANDLE thread;
|
||||||
HKEY vr_key;
|
HKEY vr_key;
|
||||||
@ -846,6 +847,25 @@ static void setup_vr_registry(void)
|
|||||||
return;
|
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))
|
if (!set_vr_status(vr_key, 0))
|
||||||
{
|
{
|
||||||
RegCloseKey(vr_key);
|
RegCloseKey(vr_key);
|
||||||
|
Loading…
Reference in New Issue
Block a user