mirror of
https://github.com/ValveSoftware/Proton.git
synced 2025-01-13 23:28:16 +03:00
vrclient: Cleanup vrclient before native library unload if the app failed to do so.
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>
This commit is contained in:
parent
d7b47f9d53
commit
5d57ef328f
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user