vrclient_x64: Unload native vrclient shared library on process detach.

CW-Bug-Id: #23390
This commit is contained in:
Paul Gofman 2024-02-09 18:20:52 -06:00 committed by Arkadiusz Hiler
parent 250242f66a
commit 8f03470527
6 changed files with 22 additions and 5 deletions

View file

@ -72,10 +72,11 @@ static BOOL load_vk_unwrappers( HMODULE winevulkan )
return TRUE;
}
static void *vrclient;
NTSTATUS vrclient_init( void *args )
{
struct vrclient_init_params *params = (struct vrclient_init_params *)args;
static void *vrclient;
params->_ret = false;
@ -110,6 +111,16 @@ NTSTATUS vrclient_init( void *args )
return 0;
}
NTSTATUS vrclient_unload( void *args )
{
if (!vrclient) return 0;
dlclose( vrclient );
vrclient = NULL;
p_HmdSystemFactory = NULL;
p_VRClientCoreFactory = NULL;
return 0;
}
NTSTATUS vrclient_HmdSystemFactory( void *args )
{
struct vrclient_HmdSystemFactory_params *params = (struct vrclient_HmdSystemFactory_params *)args;