mirror of
https://git.suyu.dev/suyu/Yucom.git
synced 2025-12-24 08:14:34 +01:00
vrclient_x64: Unload native vrclient shared library on process detach.
This commit is contained in:
parent
89c297da9d
commit
98f55bfdb1
1 changed files with 10 additions and 1 deletions
|
|
@ -46,6 +46,8 @@ typedef struct winRenderModel_TextureMap_t_11415 winRenderModel_TextureMap_t_114
|
|||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(vrclient);
|
||||
|
||||
static void *vrclient_lib;
|
||||
|
||||
BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, void *reserved)
|
||||
{
|
||||
TRACE("(%p, %u, %p)\n", instance, reason, reserved);
|
||||
|
|
@ -55,6 +57,14 @@ BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, void *reserved)
|
|||
case DLL_PROCESS_ATTACH:
|
||||
DisableThreadLibraryCalls(instance);
|
||||
break;
|
||||
|
||||
case DLL_PROCESS_DETACH:
|
||||
if (vrclient_lib)
|
||||
{
|
||||
dlclose(vrclient_lib);
|
||||
vrclient_lib = NULL;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
|
|
@ -215,7 +225,6 @@ static pfn_dtor get_win_destructor(const char *name)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
static void *vrclient_lib;
|
||||
static void *(*vrclient_HmdSystemFactory)(const char *name, int *return_code);
|
||||
static void *(*vrclient_VRClientCoreFactory)(const char *name, int *return_code);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue