summaryrefslogtreecommitdiff
path: root/src/input_common/drivers/sdl_driver.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/input_common/drivers/sdl_driver.h')
-rw-r--r--src/input_common/drivers/sdl_driver.h15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/input_common/drivers/sdl_driver.h b/src/input_common/drivers/sdl_driver.h
index c82632506..0846fbb50 100644
--- a/src/input_common/drivers/sdl_driver.h
+++ b/src/input_common/drivers/sdl_driver.h
@@ -47,6 +47,7 @@ public:
47 * Check how many identical joysticks (by guid) were connected before the one with sdl_id and so 47 * Check how many identical joysticks (by guid) were connected before the one with sdl_id and so
48 * tie it to a SDLJoystick with the same guid and that port 48 * tie it to a SDLJoystick with the same guid and that port
49 */ 49 */
50 std::shared_ptr<SDLJoystick> GetSDLJoystickByGUID(const Common::UUID& guid, int port);
50 std::shared_ptr<SDLJoystick> GetSDLJoystickByGUID(const std::string& guid, int port); 51 std::shared_ptr<SDLJoystick> GetSDLJoystickByGUID(const std::string& guid, int port);
51 52
52 std::vector<Common::ParamPackage> GetInputDevices() const override; 53 std::vector<Common::ParamPackage> GetInputDevices() const override;
@@ -79,18 +80,18 @@ private:
79 /// Takes all vibrations from the queue and sends the command to the controller 80 /// Takes all vibrations from the queue and sends the command to the controller
80 void SendVibrations(); 81 void SendVibrations();
81 82
82 Common::ParamPackage BuildAnalogParamPackageForButton(int port, std::string guid, s32 axis, 83 Common::ParamPackage BuildAnalogParamPackageForButton(int port, const Common::UUID& guid,
83 float value = 0.1f) const; 84 s32 axis, float value = 0.1f) const;
84 Common::ParamPackage BuildButtonParamPackageForButton(int port, std::string guid, 85 Common::ParamPackage BuildButtonParamPackageForButton(int port, const Common::UUID& guid,
85 s32 button) const; 86 s32 button) const;
86 87
87 Common::ParamPackage BuildHatParamPackageForButton(int port, std::string guid, s32 hat, 88 Common::ParamPackage BuildHatParamPackageForButton(int port, const Common::UUID& guid, s32 hat,
88 u8 value) const; 89 u8 value) const;
89 90
90 Common::ParamPackage BuildMotionParam(int port, std::string guid) const; 91 Common::ParamPackage BuildMotionParam(int port, const Common::UUID& guid) const;
91 92
92 Common::ParamPackage BuildParamPackageForBinding( 93 Common::ParamPackage BuildParamPackageForBinding(
93 int port, const std::string& guid, const SDL_GameControllerButtonBind& binding) const; 94 int port, const Common::UUID& guid, const SDL_GameControllerButtonBind& binding) const;
94 95
95 Common::ParamPackage BuildParamPackageForAnalog(PadIdentifier identifier, int axis_x, 96 Common::ParamPackage BuildParamPackageForAnalog(PadIdentifier identifier, int axis_x,
96 int axis_y, float offset_x, 97 int axis_y, float offset_x,
@@ -120,7 +121,7 @@ private:
120 Common::SPSCQueue<VibrationRequest> vibration_queue; 121 Common::SPSCQueue<VibrationRequest> vibration_queue;
121 122
122 /// Map of GUID of a list of corresponding virtual Joysticks 123 /// Map of GUID of a list of corresponding virtual Joysticks
123 std::unordered_map<std::string, std::vector<std::shared_ptr<SDLJoystick>>> joystick_map; 124 std::unordered_map<Common::UUID, std::vector<std::shared_ptr<SDLJoystick>>> joystick_map;
124 std::mutex joystick_map_mutex; 125 std::mutex joystick_map_mutex;
125 126
126 bool start_thread = false; 127 bool start_thread = false;