Francois Gouget : dinput: Delete the static critical section when unloading the dll.
Module: wine Branch: master Commit: 4ed24cd5f5c336291ffe0ffb9a7e65f5e0de2303 URL: http://source.winehq.org/git/wine.git/?a=commit;h=4ed24cd5f5c336291ffe0ffb9a... Author: Francois Gouget <fgouget(a)codeweavers.com> Date: Wed Nov 16 16:31:26 2011 +0100 dinput: Delete the static critical section when unloading the dll. --- dlls/dinput/dinput_main.c | 29 +++++++++++++++-------------- 1 files changed, 15 insertions(+), 14 deletions(-) diff --git a/dlls/dinput/dinput_main.c b/dlls/dinput/dinput_main.c index 373b990..c121ae9 100644 --- a/dlls/dinput/dinput_main.c +++ b/dlls/dinput/dinput_main.c @@ -97,20 +97,6 @@ static const struct dinput_device *dinput_devices[] = static HINSTANCE DINPUT_instance = NULL; -BOOL WINAPI DllMain( HINSTANCE inst, DWORD reason, LPVOID reserv) -{ - switch(reason) - { - case DLL_PROCESS_ATTACH: - DisableThreadLibraryCalls(inst); - DINPUT_instance = inst; - break; - case DLL_PROCESS_DETACH: - break; - } - return TRUE; -} - static BOOL check_hook_thread(void); static CRITICAL_SECTION dinput_hook_crit; static struct list direct_input_list = LIST_INIT( direct_input_list ); @@ -1443,3 +1429,18 @@ void check_dinput_hooks(LPDIRECTINPUTDEVICE8W iface) LeaveCriticalSection(&dinput_hook_crit); } + +BOOL WINAPI DllMain( HINSTANCE inst, DWORD reason, LPVOID reserv) +{ + switch(reason) + { + case DLL_PROCESS_ATTACH: + DisableThreadLibraryCalls(inst); + DINPUT_instance = inst; + break; + case DLL_PROCESS_DETACH: + DeleteCriticalSection(&dinput_hook_crit); + break; + } + return TRUE; +}
participants (1)
-
Alexandre Julliard