xinput: Clear instance data when a controller is hotplugged.
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
5417c3bfa4
commit
b3cc2542cb
|
@ -195,6 +195,9 @@ static BOOL init_controller(xinput_controller *controller, PHIDP_PREPARSED_DATA
|
|||
memcpy(private->device_path, device_path, size);
|
||||
private->enabled = TRUE;
|
||||
|
||||
memset(&controller->state, 0, sizeof(controller->state));
|
||||
memset(&controller->vibration, 0, sizeof(controller->vibration));
|
||||
|
||||
controller->platform_private = private;
|
||||
controller->connected = TRUE;
|
||||
|
||||
|
|
Loading…
Reference in New Issue