diff options
| author | 2021-12-13 09:05:23 -0500 | |
|---|---|---|
| committer | 2021-12-13 09:05:50 -0500 | |
| commit | 2b92d22bda767c7c723935c357bea474f8e2d2f8 (patch) | |
| tree | e732bb3b2062562c031ea54937514ca34ab6e6b1 /src/input_common/drivers/sdl_driver.h | |
| parent | input_engine: Remove callback clearing in constructor (diff) | |
| download | yuzu-2b92d22bda767c7c723935c357bea474f8e2d2f8.tar.gz yuzu-2b92d22bda767c7c723935c357bea474f8e2d2f8.tar.xz yuzu-2b92d22bda767c7c723935c357bea474f8e2d2f8.zip | |
input_engine: std::move engine name where applicable
We can allow the name to be moved into, allowing allocations to be
avoided.
Diffstat (limited to 'src/input_common/drivers/sdl_driver.h')
| -rw-r--r-- | src/input_common/drivers/sdl_driver.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/input_common/drivers/sdl_driver.h b/src/input_common/drivers/sdl_driver.h index d03ff4b84..c6fffe374 100644 --- a/src/input_common/drivers/sdl_driver.h +++ b/src/input_common/drivers/sdl_driver.h | |||
| @@ -19,19 +19,19 @@ using SDL_GameController = struct _SDL_GameController; | |||
| 19 | using SDL_Joystick = struct _SDL_Joystick; | 19 | using SDL_Joystick = struct _SDL_Joystick; |
| 20 | using SDL_JoystickID = s32; | 20 | using SDL_JoystickID = s32; |
| 21 | 21 | ||
| 22 | namespace InputCommon { | ||
| 23 | |||
| 24 | class SDLJoystick; | ||
| 25 | |||
| 22 | using ButtonBindings = | 26 | using ButtonBindings = |
| 23 | std::array<std::pair<Settings::NativeButton::Values, SDL_GameControllerButton>, 17>; | 27 | std::array<std::pair<Settings::NativeButton::Values, SDL_GameControllerButton>, 17>; |
| 24 | using ZButtonBindings = | 28 | using ZButtonBindings = |
| 25 | std::array<std::pair<Settings::NativeButton::Values, SDL_GameControllerAxis>, 2>; | 29 | std::array<std::pair<Settings::NativeButton::Values, SDL_GameControllerAxis>, 2>; |
| 26 | 30 | ||
| 27 | namespace InputCommon { | 31 | class SDLDriver : public InputEngine { |
| 28 | |||
| 29 | class SDLJoystick; | ||
| 30 | |||
| 31 | class SDLDriver : public InputCommon::InputEngine { | ||
| 32 | public: | 32 | public: |
| 33 | /// Initializes and registers SDL device factories | 33 | /// Initializes and registers SDL device factories |
| 34 | SDLDriver(const std::string& input_engine_); | 34 | explicit SDLDriver(std::string input_engine_); |
| 35 | 35 | ||
| 36 | /// Unregisters SDL device factories and shut them down. | 36 | /// Unregisters SDL device factories and shut them down. |
| 37 | ~SDLDriver() override; | 37 | ~SDLDriver() override; |