From b689a195ff283414968d4b433e389a06742e166c Mon Sep 17 00:00:00 2001 From: Michael M Date: Thu, 5 Jul 2018 14:17:07 -0700 Subject: [PATCH] Qt: add Settings::DevicesChanged signal --- Source/Core/DolphinQt/Settings.cpp | 4 ++++ Source/Core/DolphinQt/Settings.h | 1 + 2 files changed, 5 insertions(+) diff --git a/Source/Core/DolphinQt/Settings.cpp b/Source/Core/DolphinQt/Settings.cpp index fa992bee7d..61062d9894 100644 --- a/Source/Core/DolphinQt/Settings.cpp +++ b/Source/Core/DolphinQt/Settings.cpp @@ -22,6 +22,7 @@ #include "DolphinQt/GameList/GameListModel.h" #include "DolphinQt/QtUtils/QueueOnObject.h" +#include "InputCommon/ControllerInterface/ControllerInterface.h" #include "InputCommon/InputConfig.h" Settings::Settings() @@ -34,6 +35,9 @@ Settings::Settings() Config::AddConfigChangedCallback( [this] { QueueOnObject(this, [this] { emit ConfigChanged(); }); }); + g_controller_interface.RegisterDevicesChangedCallback( + [this] { QueueOnObject(this, [this] { emit DevicesChanged(); }); }); + SetCurrentUserStyle(GetCurrentUserStyle()); } diff --git a/Source/Core/DolphinQt/Settings.h b/Source/Core/DolphinQt/Settings.h index ba6facb87c..0c1b61d745 100644 --- a/Source/Core/DolphinQt/Settings.h +++ b/Source/Core/DolphinQt/Settings.h @@ -159,6 +159,7 @@ signals: void DebugFontChanged(QFont font); void AutoUpdateTrackChanged(const QString& mode); void AnalyticsToggled(bool enabled); + void DevicesChanged(); private: bool m_batch = false;