diff options
| author | 2017-12-06 05:26:29 +0100 | |
|---|---|---|
| committer | 2018-01-15 20:02:30 -0500 | |
| commit | eaff98dbb3da3c7524a504abb1cdd5daa3480dda (patch) | |
| tree | 4e5d28ed590b01d001c065e6ac08f2df6daabf75 /src/input_common/sdl/sdl.h | |
| parent | pctl: Clang format. (diff) | |
| download | yuzu-eaff98dbb3da3c7524a504abb1cdd5daa3480dda.tar.gz yuzu-eaff98dbb3da3c7524a504abb1cdd5daa3480dda.tar.xz yuzu-eaff98dbb3da3c7524a504abb1cdd5daa3480dda.zip | |
Adding meumart's Citra SDL Joystick support. Citra PR #3116
Diffstat (limited to 'src/input_common/sdl/sdl.h')
| -rw-r--r-- | src/input_common/sdl/sdl.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/input_common/sdl/sdl.h b/src/input_common/sdl/sdl.h index 3e72debcc..7934099d4 100644 --- a/src/input_common/sdl/sdl.h +++ b/src/input_common/sdl/sdl.h | |||
| @@ -4,8 +4,21 @@ | |||
| 4 | 4 | ||
| 5 | #pragma once | 5 | #pragma once |
| 6 | 6 | ||
| 7 | #include <memory> | ||
| 8 | #include <vector> | ||
| 7 | #include "core/frontend/input.h" | 9 | #include "core/frontend/input.h" |
| 8 | 10 | ||
| 11 | union SDL_Event; | ||
| 12 | namespace Common { | ||
| 13 | class ParamPackage; | ||
| 14 | } | ||
| 15 | namespace InputCommon { | ||
| 16 | namespace Polling { | ||
| 17 | class DevicePoller; | ||
| 18 | enum class DeviceType; | ||
| 19 | } // namespace Polling | ||
| 20 | } // namespace InputCommon | ||
| 21 | |||
| 9 | namespace InputCommon { | 22 | namespace InputCommon { |
| 10 | namespace SDL { | 23 | namespace SDL { |
| 11 | 24 | ||
| @@ -15,5 +28,15 @@ void Init(); | |||
| 15 | /// Unresisters SDL device factories and shut them down. | 28 | /// Unresisters SDL device factories and shut them down. |
| 16 | void Shutdown(); | 29 | void Shutdown(); |
| 17 | 30 | ||
| 31 | /// Creates a ParamPackage from an SDL_Event that can directly be used to create a ButtonDevice | ||
| 32 | Common::ParamPackage SDLEventToButtonParamPackage(const SDL_Event& event); | ||
| 33 | |||
| 34 | namespace Polling { | ||
| 35 | |||
| 36 | /// Get all DevicePoller that use the SDL backend for a specific device type | ||
| 37 | std::vector<std::unique_ptr<InputCommon::Polling::DevicePoller>> GetPollers( | ||
| 38 | InputCommon::Polling::DeviceType type); | ||
| 39 | |||
| 40 | } // namespace Polling | ||
| 18 | } // namespace SDL | 41 | } // namespace SDL |
| 19 | } // namespace InputCommon | 42 | } // namespace InputCommon |