diff options
| author | seth <seth@ske.moe> | 2020-12-13 00:30:27 +0000 |
|---|---|---|
| committer | seth <seth@ske.moe> | 2020-12-13 00:30:27 +0000 |
| commit | 00ec25d520f662c5c60d8b8cc9830687c3ce281f (patch) | |
| tree | f6307b7d9bacb8c3fe829e0c6e96e89c02838d87 /Source/Core/InputCommon/ControllerInterface/ControllerInterface.h | |
| parent | d31249593421dcdb4f6ef09485ec7e3e96cb4632 (diff) | |
InputCommon: Fix callback dispatch deadlock
Make sure m_is_populating_devices is true when a WM_INPUT_DEVICE_CHANGE
event is received directly on the ciface thread, so that callbacks do
not occur while removing devices. This breaks a hold-and-wait deadlock
between the ciface thread and the CPU thread when using emulated
Wiimotes.
Co-authored-by: brainleq <brainleq@users.noreply.github.com>
Co-authored-by: oldmud0 <oldmud0@users.noreply.github.com>
Diffstat (limited to 'Source/Core/InputCommon/ControllerInterface/ControllerInterface.h')
| -rw-r--r-- | Source/Core/InputCommon/ControllerInterface/ControllerInterface.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Source/Core/InputCommon/ControllerInterface/ControllerInterface.h b/Source/Core/InputCommon/ControllerInterface/ControllerInterface.h index 4f1651f361..84209a720b 100644 --- a/Source/Core/InputCommon/ControllerInterface/ControllerInterface.h +++ b/Source/Core/InputCommon/ControllerInterface/ControllerInterface.h @@ -50,6 +50,7 @@ public: void Shutdown(); void AddDevice(std::shared_ptr<ciface::Core::Device> device); void RemoveDevice(std::function<bool(const ciface::Core::Device*)> callback); + void PlatformPopulateDevices(std::function<void()> callback); bool IsInit() const { return m_is_init; } void UpdateInput(); |
