steam_helper: Remove now unnecessary OpenXR registry initialization.

CW-Bug-Id: #24510
This commit is contained in:
Rémi Bernon 2024-11-21 14:11:50 +01:00 committed by Arkadiusz Hiler
parent 8fb744e2d6
commit 9acae7b80b

View File

@ -445,7 +445,6 @@ static void *get_winevulkan_unix_lib_handle(HMODULE hvulkan)
static DWORD WINAPI initialize_vr_data(void *arg)
{
int (WINAPI *p__wineopenxr_get_extensions_internal)(char **instance_extensions, char **device_extensions, uint32_t *physdev_vid, uint32_t *physdev_pid);
vr::IVRClientCore* (*vrclient_VRClientCoreFactory)(const char *name, int *return_code);
uint32_t instance_extensions_count, device_count;
VkPhysicalDevice *phys_devices = NULL;
@ -455,7 +454,6 @@ static DWORD WINAPI initialize_vr_data(void *arg)
VkApplicationInfo app_info = {};
char *buffer = NULL, *new_buffer;
vr::IVRClientCore* client_core;
char *xr_inst_ext, *xr_dev_ext;
vr::IVRCompositor* compositor;
VkInstance vk_instance = NULL;
BOOL vr_initialized = FALSE;
@ -645,52 +643,16 @@ static DWORD WINAPI initialize_vr_data(void *arg)
vr_initialized = FALSE;
}
if ((hwineopenxr = LoadLibraryA("wineopenxr.dll")))
{
p__wineopenxr_get_extensions_internal = reinterpret_cast<decltype(p__wineopenxr_get_extensions_internal)>
(GetProcAddress(hwineopenxr, "__wineopenxr_get_extensions_internal"));
if (p__wineopenxr_get_extensions_internal)
{
uint32_t vid, pid;
if (!p__wineopenxr_get_extensions_internal(&xr_inst_ext, &xr_dev_ext, &vid, &pid))
{
WINE_TRACE("Got XR extensions.\n");
if ((status = RegSetValueExA(vr_key, "openxr_vulkan_instance_extensions", 0, REG_SZ,
(BYTE *)xr_inst_ext, strlen(xr_inst_ext) + 1)))
{
WINE_ERR("Could not set openxr_vulkan_instance_extensions value, status %#x.\n", status);
goto done;
}
if ((status = RegSetValueExA(vr_key, "openxr_vulkan_device_extensions", 0, REG_SZ,
(BYTE *)xr_dev_ext, strlen(xr_dev_ext) + 1)))
{
WINE_ERR("Could not set openxr_vulkan_device_extensions value, status %#x.\n", status);
goto done;
}
if ((status = RegSetValueExA(vr_key, "openxr_vulkan_device_vid", 0, REG_DWORD,
(BYTE *)&vid, sizeof(vid))))
{
WINE_ERR("Could not set openxr_vulkan_device_vid value, status %#x.\n", status);
goto done;
}
if ((status = RegSetValueExA(vr_key, "openxr_vulkan_device_pid", 0, REG_DWORD,
(BYTE *)&pid, sizeof(pid))))
{
WINE_ERR("Could not set openxr_vulkan_device_pid value, status %#x.\n", status);
goto done;
}
}
}
if (!(hwineopenxr = LoadLibraryA("wineopenxr.dll"))) WARN("Could not load wineopenxr.dll, err %u.\n", GetLastError());
else
{
WINE_ERR("__wineopenxr_get_extensions_internal not found in wineopenxr.dll.\n");
}
BOOL (CDECL *init)(void);
if ((init = (decltype(init))GetProcAddress(hwineopenxr, "wineopenxr_init_registry"))) init();
else ERR("Failed to find wineopenxr_init_registry export\n");
FreeLibrary(hwineopenxr);
}
else
{
WINE_WARN("Could not load wineopenxr.dll, err %u.\n", GetLastError());
}
vr_status = 1;