dinput: Add DebugInfo to critical sections.
This commit is contained in:
parent
6316429c80
commit
52a630a3a8
|
@ -471,7 +471,7 @@ static HRESULT alloc_device(REFGUID rguid, const void *jvt, IDirectInputImpl *di
|
|||
newDevice->dinput = dinput;
|
||||
CopyMemory(&newDevice->base.guid, rguid, sizeof(*rguid));
|
||||
InitializeCriticalSection(&newDevice->base.crit);
|
||||
newDevice->base.crit.DebugInfo->Spare[0] = (DWORD_PTR)"DINPUT_joystick";
|
||||
newDevice->base.crit.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": JoystickImpl*->base.crit");
|
||||
|
||||
/* setup_dinput_options may change these */
|
||||
newDevice->deadzone = 0;
|
||||
|
|
|
@ -365,6 +365,7 @@ static JoystickImpl *alloc_device(REFGUID rguid, const void *jvt, IDirectInputIm
|
|||
newDevice->base.ref = 1;
|
||||
memcpy(&newDevice->base.guid, rguid, sizeof(*rguid));
|
||||
InitializeCriticalSection(&newDevice->base.crit);
|
||||
newDevice->base.crit.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": JoystickImpl*->base.crit");
|
||||
newDevice->joyfd = -1;
|
||||
newDevice->dinput = dinput;
|
||||
newDevice->joydev = joydev;
|
||||
|
@ -527,6 +528,7 @@ static ULONG WINAPI JoystickAImpl_Release(LPDIRECTINPUTDEVICE8A iface)
|
|||
release_DataFormat(&This->base.data_format);
|
||||
|
||||
IDirectInput_Release((LPDIRECTINPUTDEVICE8A)This->dinput);
|
||||
This->base.crit.DebugInfo->Spare[0] = 0;
|
||||
DeleteCriticalSection(&This->base.crit);
|
||||
|
||||
HeapFree(GetProcessHeap(),0,This);
|
||||
|
|
|
@ -196,6 +196,7 @@ static SysKeyboardImpl *alloc_device(REFGUID rguid, const void *kvt, IDirectInpu
|
|||
memcpy(&newDevice->base.guid, rguid, sizeof(*rguid));
|
||||
newDevice->dinput = dinput;
|
||||
InitializeCriticalSection(&newDevice->base.crit);
|
||||
newDevice->base.crit.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": SysKeyboardImpl*->base.crit");
|
||||
|
||||
/* Create copy of default data format */
|
||||
if (!(df = HeapAlloc(GetProcessHeap(), 0, c_dfDIKeyboard.dwSize))) goto failed;
|
||||
|
@ -290,6 +291,7 @@ static ULONG WINAPI SysKeyboardAImpl_Release(LPDIRECTINPUTDEVICE8A iface)
|
|||
release_DataFormat(&This->base.data_format);
|
||||
|
||||
IDirectInput_Release((LPDIRECTINPUTDEVICE8A)This->dinput);
|
||||
This->base.crit.DebugInfo->Spare[0] = 0;
|
||||
DeleteCriticalSection(&This->base.crit);
|
||||
HeapFree(GetProcessHeap(), 0, This);
|
||||
|
||||
|
|
|
@ -177,6 +177,7 @@ static SysMouseImpl *alloc_device(REFGUID rguid, const void *mvt, IDirectInputIm
|
|||
newDevice->base.dwCoopLevel = DISCL_NONEXCLUSIVE | DISCL_BACKGROUND;
|
||||
memcpy(&newDevice->base.guid, rguid, sizeof(*rguid));
|
||||
InitializeCriticalSection(&newDevice->base.crit);
|
||||
newDevice->base.crit.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": SysMouseImpl*->base.crit");
|
||||
newDevice->dinput = dinput;
|
||||
|
||||
/* Create copy of default data format */
|
||||
|
@ -278,6 +279,7 @@ static ULONG WINAPI SysMouseAImpl_Release(LPDIRECTINPUTDEVICE8A iface)
|
|||
release_DataFormat(&This->base.data_format);
|
||||
|
||||
IDirectInput_Release((LPDIRECTINPUTDEVICE8A)This->dinput);
|
||||
This->base.crit.DebugInfo->Spare[0] = 0;
|
||||
DeleteCriticalSection(&This->base.crit);
|
||||
HeapFree(GetProcessHeap(),0,This);
|
||||
return 0;
|
||||
|
|
Loading…
Reference in New Issue