summaryrefslogtreecommitdiff
path: root/Source/Core/InputCommon/ControllerInterface/SDL/SDL.cpp
diff options
context:
space:
mode:
authorAdmiral H. Curtiss <pikachu025@gmail.com>2023-12-29 20:17:04 +0100
committerGitHub <noreply@github.com>2023-12-29 20:17:04 +0100
commit99fbc4b97ecc21c82a8cde602af1bf3b47a186d2 (patch)
treec42b16871bed955e337895a8d3c42ee17cf164c8 /Source/Core/InputCommon/ControllerInterface/SDL/SDL.cpp
parentbf0ac9de0ccf004b86ccadd0a0212fc6804d7600 (diff)
parente456bef163c1b667ff5a045a4bda66b30326ae90 (diff)
Merge pull request #11885 from Filoppi/devices_deadlock_fix_v2
Input: Improve Controller Interface devices threading
Diffstat (limited to 'Source/Core/InputCommon/ControllerInterface/SDL/SDL.cpp')
-rw-r--r--Source/Core/InputCommon/ControllerInterface/SDL/SDL.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/Source/Core/InputCommon/ControllerInterface/SDL/SDL.cpp b/Source/Core/InputCommon/ControllerInterface/SDL/SDL.cpp
index ac0123aedd..3bf4020ad5 100644
--- a/Source/Core/InputCommon/ControllerInterface/SDL/SDL.cpp
+++ b/Source/Core/InputCommon/ControllerInterface/SDL/SDL.cpp
@@ -18,6 +18,11 @@
#include <Windows.h>
#endif
+namespace ciface::Core
+{
+class Device;
+}
+
namespace ciface::SDL
{
static std::string GetJoystickName(int index)
@@ -35,7 +40,7 @@ public:
InputBackend(ControllerInterface* controller_interface);
~InputBackend();
void PopulateDevices() override;
- void UpdateInput() override;
+ void UpdateInput(std::vector<std::weak_ptr<ciface::Core::Device>>& devices_to_remove) override;
private:
void OpenAndAddDevice(int index);
@@ -637,7 +642,7 @@ void Joystick::Motor::SetState(ControlState state)
}
#endif
-void InputBackend::UpdateInput()
+void InputBackend::UpdateInput(std::vector<std::weak_ptr<ciface::Core::Device>>& devices_to_remove)
{
SDL_JoystickUpdate();
}