From 0e9c2536c0c108f00c4bbf2112c5c652c7bb9af8 Mon Sep 17 00:00:00 2001 From: Paul Gofman Date: Mon, 3 May 2021 22:09:55 +0300 Subject: [PATCH] steam_helper: Store HMD presence status in registry. CW-Bug-Id: 18901 --- steam_helper/steam.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/steam_helper/steam.cpp b/steam_helper/steam.cpp index 8cb8559b..4f6e825c 100644 --- a/steam_helper/steam.cpp +++ b/steam_helper/steam.cpp @@ -559,6 +559,7 @@ static DWORD WINAPI initialize_vr_data(void *arg) unsigned int app_id; unsigned int length; void *lib_vrclient; + DWORD hmd_present; int return_code; LSTATUS status; unsigned int i; @@ -604,6 +605,11 @@ static DWORD WINAPI initialize_vr_data(void *arg) } vr_initialized = TRUE; + hmd_present = !!client_core->BIsHmdPresent(); + WINE_TRACE("hmd_present %#x.\n", hmd_present); + if ((status = RegSetValueExA(vr_key, "is_hmd_present", 0, REG_DWORD, (BYTE *)&hmd_present, sizeof(hmd_present)))) + WINE_ERR("Could not set is_hmd_present value, status %#x.\n", status); + compositor = reinterpret_cast(client_core->GetGenericInterface(vr::IVRCompositor_Version, &error)); if (!compositor) {