diff options
author | Paul Gofman <pgofman@codeweavers.com> | 2021-03-30 20:27:10 +0300 |
---|---|---|
committer | Andrew Eikum <aeikum@codeweavers.com> | 2021-03-31 22:08:11 +0300 |
commit | 5d57ef328f72d9a1b56d192233b31f16473e5ad1 (patch) | |
tree | 208a477e9d3d2d2526ed35092cac26a458e86a40 | |
parent | d7b47f9d5304418f7398693cb8d1e36d2ff80ce8 (diff) |
vrclient: Cleanup vrclient before native library unload if the app failed to do so.proton-6.3-1
Unloading native library without the cleanup hangs. If the native
library is not unloaded explicitly the Linux process then hangs on exit.
Fixes hang on exit from Doom VFR.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
-rw-r--r-- | vrclient_x64/vrclient_x64/vrclient_main.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/vrclient_x64/vrclient_x64/vrclient_main.c b/vrclient_x64/vrclient_x64/vrclient_main.c index 566594dd..dc7568af 100644 --- a/vrclient_x64/vrclient_x64/vrclient_main.c +++ b/vrclient_x64/vrclient_x64/vrclient_main.c @@ -58,6 +58,7 @@ static struct IDXGIVkInteropDevice *dxvk_device; #endif BOOL d3d11_explicit_handoff, handoff_called; + void *client_core_linux_side; } compositor_data; @@ -74,6 +75,11 @@ BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, void *reserved) case DLL_PROCESS_DETACH: if (vrclient_lib) { + if (compositor_data.client_core_linux_side) + { + cppIVRClientCore_IVRClientCore_003_Cleanup(compositor_data.client_core_linux_side); + compositor_data.client_core_linux_side = NULL; + } dlclose(vrclient_lib); vrclient_lib = NULL; } @@ -386,6 +392,9 @@ EVRInitError ivrclientcore_init(EVRInitError (*cpp_func)(void *, EVRApplicationT if (error) WARN("error %#x\n", error); + else + compositor_data.client_core_linux_side = linux_side; + return error; } |