summaryrefslogtreecommitdiff
path: root/src/input_common/sdl/sdl.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/input_common/sdl/sdl.h')
-rw-r--r--src/input_common/sdl/sdl.h23
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
11union SDL_Event;
12namespace Common {
13class ParamPackage;
14}
15namespace InputCommon {
16namespace Polling {
17class DevicePoller;
18enum class DeviceType;
19} // namespace Polling
20} // namespace InputCommon
21
9namespace InputCommon { 22namespace InputCommon {
10namespace SDL { 23namespace 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.
16void Shutdown(); 29void Shutdown();
17 30
31/// Creates a ParamPackage from an SDL_Event that can directly be used to create a ButtonDevice
32Common::ParamPackage SDLEventToButtonParamPackage(const SDL_Event& event);
33
34namespace Polling {
35
36/// Get all DevicePoller that use the SDL backend for a specific device type
37std::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