wintab32: Make the csTablet critical section static.

This commit is contained in:
Francois Gouget 2011-11-15 14:41:30 +01:00 committed by Alexandre Julliard
parent 5305c8e009
commit 148e6c3a3c
1 changed files with 7 additions and 4 deletions

View File

@ -34,7 +34,13 @@ WINE_DEFAULT_DEBUG_CHANNEL(wintab32);
HWND hwndDefault = NULL; HWND hwndDefault = NULL;
static const WCHAR static const WCHAR
WC_TABLETCLASSNAME[] = {'W','i','n','e','T','a','b','l','e','t','C','l','a','s','s',0}; WC_TABLETCLASSNAME[] = {'W','i','n','e','T','a','b','l','e','t','C','l','a','s','s',0};
CRITICAL_SECTION csTablet; static CRITICAL_SECTION_DEBUG csTablet_debug =
{
0, 0, &csTablet,
{ &csTablet_debug.ProcessLocksList, &csTablet_debug.ProcessLocksList },
0, 0, { (DWORD_PTR)(__FILE__ ": csTablet") }
};
CRITICAL_SECTION csTablet = { &csTablet_debug, -1, 0, 0, 0, 0 };
int (CDECL *pLoadTabletInfo)(HWND hwnddefault) = NULL; int (CDECL *pLoadTabletInfo)(HWND hwnddefault) = NULL;
int (CDECL *pGetCurrentPacket)(LPWTPACKET packet) = NULL; int (CDECL *pGetCurrentPacket)(LPWTPACKET packet) = NULL;
@ -74,8 +80,6 @@ BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpReserved)
case DLL_PROCESS_ATTACH: case DLL_PROCESS_ATTACH:
TRACE("Initialization\n"); TRACE("Initialization\n");
DisableThreadLibraryCalls(hInstDLL); DisableThreadLibraryCalls(hInstDLL);
InitializeCriticalSection(&csTablet);
csTablet.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": csTablet");
hx11drv = GetModuleHandleA("winex11.drv"); hx11drv = GetModuleHandleA("winex11.drv");
if (hx11drv) if (hx11drv)
{ {
@ -98,7 +102,6 @@ BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpReserved)
hwndDefault = 0; hwndDefault = 0;
} }
TABLET_Unregister(); TABLET_Unregister();
csTablet.DebugInfo->Spare[0] = 0;
DeleteCriticalSection(&csTablet); DeleteCriticalSection(&csTablet);
break; break;
} }