From d2080ad0fd9c8a4fc0051f2c42eac25fa8d9d960 Mon Sep 17 00:00:00 2001 From: Paul Gofman Date: Tue, 3 Aug 2021 20:10:14 +0300 Subject: [PATCH] steam_helper: Don't hand off Steam appid to OpenVR runtime in initialize_vr_data(). CW-Bug-Id: 19220 Initializing OpenVR with the app's game ID seems to cause problems with Steam VR runtime stability when the game uses OpenXR. The negative impact is that if OpenVR is started the initialization will be delayed for 2 seconds by vrserver waiting for valid appid. But the wait goes in parallel with main application startup and should not delay things much, if at all. --- steam_helper/steam.cpp | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/steam_helper/steam.cpp b/steam_helper/steam.cpp index b2e86081..f226e672 100644 --- a/steam_helper/steam.cpp +++ b/steam_helper/steam.cpp @@ -563,7 +563,6 @@ static DWORD WINAPI initialize_vr_data(void *arg) int return_code; LSTATUS status; unsigned int i; - char str[256]; VkResult res; WINE_TRACE("Starting VR info initialization.\n"); @@ -587,14 +586,8 @@ static DWORD WINAPI initialize_vr_data(void *arg) WINE_ERR("Could not get IVRClientCore, error %d.\n", return_code); } - if ((env_str = getenv("SteamGameId"))) - app_id = atoi(env_str); - else - app_id = 1245040; /* Proton 5.0 */ - /* Without overriding the app_key vrclient waits 2 seconds for a valid appkey before returning. */ - sprintf(str, "{ \"app_key\" : \"steam.app.%u\" }", app_id); - error = client_core->Init(vr::VRApplication_Background, str); + error = client_core->Init(vr::VRApplication_Background, NULL); if (error != vr::VRInitError_None) { if (error == vr::VRInitError_Init_NoServerForBackgroundApp)