mirror of
https://git.suyu.dev/suyu/Yucom.git
synced 2026-01-04 13:44:22 +01:00
wineopenxr: Propagate vulkan device IDs from steam.exe to the application.
This commit is contained in:
parent
c35598bb21
commit
22fa6c7346
2 changed files with 35 additions and 9 deletions
|
|
@ -682,7 +682,7 @@ 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);
|
||||
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;
|
||||
|
|
@ -880,7 +880,8 @@ static DWORD WINAPI initialize_vr_data(void *arg)
|
|||
(GetProcAddress(hwineopenxr, "__wineopenxr_get_extensions_internal"));
|
||||
if (p__wineopenxr_get_extensions_internal)
|
||||
{
|
||||
if (!p__wineopenxr_get_extensions_internal(&xr_inst_ext, &xr_dev_ext))
|
||||
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,
|
||||
|
|
@ -895,6 +896,18 @@ static DWORD WINAPI initialize_vr_data(void *arg)
|
|||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue