From cb407263eafaa0db0b58f4f72a067e4868c15936 Mon Sep 17 00:00:00 2001 From: Connor McLaughlin Date: Sat, 21 Nov 2020 18:58:27 +1000 Subject: [PATCH] XInputControllerInterface: Fix device connected spam --- src/frontend-common/xinput_controller_interface.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/frontend-common/xinput_controller_interface.cpp b/src/frontend-common/xinput_controller_interface.cpp index 90f7b6f95..144391b7f 100644 --- a/src/frontend-common/xinput_controller_interface.cpp +++ b/src/frontend-common/xinput_controller_interface.cpp @@ -158,7 +158,13 @@ void XInputControllerInterface::CheckForStateChanges(u32 index, const XINPUT_STA void XInputControllerInterface::ClearBindings() { - m_controllers.fill({}); + for (ControllerData& cd : m_controllers) + { + cd.axis_mapping.fill({}); + cd.button_mapping.fill({}); + cd.axis_button_mapping.fill({}); + cd.button_axis_mapping.fill({}); + } } bool XInputControllerInterface::BindControllerAxis(int controller_index, int axis_number, AxisSide axis_side,