diff options
Diffstat (limited to 'Source/Core/InputCommon/InputConfig.cpp')
| -rw-r--r-- | Source/Core/InputCommon/InputConfig.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/Source/Core/InputCommon/InputConfig.cpp b/Source/Core/InputCommon/InputConfig.cpp index 2dd39f945b..0e56adf378 100644 --- a/Source/Core/InputCommon/InputConfig.cpp +++ b/Source/Core/InputCommon/InputConfig.cpp @@ -172,15 +172,16 @@ void InputConfig::RegisterHotplugCallback() { // Update control references on all controllers // as configured devices may have been added or removed. - m_hotplug_callback_handle = g_controller_interface.RegisterDevicesChangedCallback([this] { - for (auto& controller : m_controllers) - controller->UpdateReferences(g_controller_interface); - }); + m_hotplug_event_hook = + g_controller_interface.RegisterDevicesChangedCallback("InputConfig", [this] { + for (auto& controller : m_controllers) + controller->UpdateReferences(g_controller_interface); + }); } void InputConfig::UnregisterHotplugCallback() { - g_controller_interface.UnregisterDevicesChangedCallback(m_hotplug_callback_handle); + m_hotplug_event_hook.reset(); } bool InputConfig::IsControllerControlledByGamepadDevice(int index) const |
