mirror of
https://github.com/ValveSoftware/Proton.git
synced 2024-12-27 23:25:50 +03:00
steam_helper: clean up OpenVR before getting OpenXR extensions in initialize_vr_data
Patch written by Emily <102429049+emily-is-my-username@users.noreply.github.com> https://github.com/ValveSoftware/Proton/pull/8126 When using OpenComposite, both OpenVR and OpenXR functions may call the same underlying OpenXR loader. Because the OpenXR loader only supports a single active instance, `initialize_vr_data` currently fails as an OpenXR instance has already been initialized ath the time XR extensions are queried. This commit fixes the problem by cleaning up the temporary OpenVR context *before* initializing OpenXR instead of keeping it open until the end of the call. Fix for: https://github.com/ValveSoftware/Proton/issues/7905 Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
This commit is contained in:
parent
9ef062cef7
commit
5b26b6a1d4
@ -893,6 +893,11 @@ static DWORD WINAPI initialize_vr_data(void *arg)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (vr_initialized) {
|
||||||
|
client_core->Cleanup();
|
||||||
|
vr_initialized = FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
if ((hwineopenxr = LoadLibraryA("wineopenxr.dll")))
|
if ((hwineopenxr = LoadLibraryA("wineopenxr.dll")))
|
||||||
{
|
{
|
||||||
p__wineopenxr_get_extensions_internal = reinterpret_cast<decltype(p__wineopenxr_get_extensions_internal)>
|
p__wineopenxr_get_extensions_internal = reinterpret_cast<decltype(p__wineopenxr_get_extensions_internal)>
|
||||||
|
Loading…
Reference in New Issue
Block a user