Tyson Whitehead (@twhitehead) commented about dlls/dinput/joystick_hid.c:
*out = NULL;
if (!(impl = calloc( 1, sizeof(*impl) ))) return E_OUTOFMEMORY; - dinput_device_init( &impl->base, &hid_joystick_vtbl, guid, dinput ); + InitializeCriticalSectionEx( &impl->base.crit, 0, RTL_CRITICAL_SECTION_FLAG_FORCE_DEBUG_INFO );
@rbernon I pushed the `dinput_device` structure initialization down a bit as I needed `instance.tszInstanceName` set in order to check if there were any overrides when setting the initial value for `autocenter`. It looked to me like the only part that was used right away was the `crit` critical section, so I pulled that out and initialized it at the original call site. This didn't seem that bad as the original call site was already directly setting the `crit.DebugInfo` and some other items. Compiled and worked okay for me, but thought I would mention it to get a second pair of eyes on it. Thanks! -- https://gitlab.winehq.org/wine/wine/-/merge_requests/8744#note_112589