diff options
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 |