diff options
author | Morph <39850852+Morph1984@users.noreply.github.com> | 2020-07-22 10:39:53 -0400 |
---|---|---|
committer | Morph <39850852+Morph1984@users.noreply.github.com> | 2020-08-26 02:32:32 -0400 |
commit | f0fac0c7fb6f7dd9fe81747b3369767c8c9e7d01 (patch) | |
tree | 4438688a9b9b4bc015985f2df1a731de57fe50db /src/input_common/sdl/sdl_impl.h | |
parent | b8885aa03bed5f9a374163d3fdcb67e59ab4c441 (diff) |
Project Mjölnir: Part 1
Co-authored-by: James Rowe <jroweboy@gmail.com>
Co-authored-by: Its-Rei <kupfel@gmail.com>
Diffstat (limited to 'src/input_common/sdl/sdl_impl.h')
-rw-r--r-- | src/input_common/sdl/sdl_impl.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/input_common/sdl/sdl_impl.h b/src/input_common/sdl/sdl_impl.h index 606a32c5b4..bd19ba61de 100644 --- a/src/input_common/sdl/sdl_impl.h +++ b/src/input_common/sdl/sdl_impl.h @@ -50,6 +50,11 @@ public: std::atomic<bool> polling = false; Common::SPSCQueue<SDL_Event> event_queue; + std::vector<Common::ParamPackage> GetInputDevices() override; + + ButtonMapping GetButtonMappingForDevice(const Common::ParamPackage& params) override; + AnalogMapping GetAnalogMappingForDevice(const Common::ParamPackage& params) override; + private: void InitJoystick(int joystick_index); void CloseJoystick(SDL_Joystick* sdl_joystick); @@ -57,6 +62,9 @@ private: /// Needs to be called before SDL_QuitSubSystem. void CloseJoysticks(); + // Set to true if SDL supports game controller subsystem + bool has_gamecontroller = false; + /// Map of GUID of a list of corresponding virtual Joysticks std::unordered_map<std::string, std::vector<std::shared_ptr<SDLJoystick>>> joystick_map; std::mutex joystick_map_mutex; |