diff options
| author | Léo Lam <leo@leolam.fr> | 2020-12-15 01:16:59 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-12-15 01:16:59 +0100 |
| commit | ed1564515b7c4d9a72c56f28b98b571c18212599 (patch) | |
| tree | 17558412ce62432b266e117710473b7b1e7c803f /Source/Core/InputCommon/ControllerInterface/ControllerInterface.cpp | |
| parent | 2c2ec16b53312466cf793978f8f24555bc3d1ba0 (diff) | |
| parent | 00ec25d520f662c5c60d8b8cc9830687c3ce281f (diff) | |
Merge pull request #9326 from Subject38/wiimote_deadlock
InputCommon: Fix callback dispatch deadlock
Diffstat (limited to 'Source/Core/InputCommon/ControllerInterface/ControllerInterface.cpp')
| -rw-r--r-- | Source/Core/InputCommon/ControllerInterface/ControllerInterface.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/Source/Core/InputCommon/ControllerInterface/ControllerInterface.cpp b/Source/Core/InputCommon/ControllerInterface/ControllerInterface.cpp index eabc2cd0f1..1d198ca494 100644 --- a/Source/Core/InputCommon/ControllerInterface/ControllerInterface.cpp +++ b/Source/Core/InputCommon/ControllerInterface/ControllerInterface.cpp @@ -140,6 +140,19 @@ void ControllerInterface::RefreshDevices() InvokeDevicesChangedCallbacks(); } +void ControllerInterface::PlatformPopulateDevices(std::function<void()> callback) +{ + if (!m_is_init) + return; + + m_is_populating_devices = true; + + callback(); + + m_is_populating_devices = false; + InvokeDevicesChangedCallbacks(); +} + // Remove all devices and call library cleanup functions void ControllerInterface::Shutdown() { |
