summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/input_common/drivers/gc_adapter.cpp2
-rw-r--r--src/input_common/drivers/gc_adapter.h6
-rw-r--r--src/input_common/drivers/keyboard.cpp2
-rw-r--r--src/input_common/drivers/keyboard.h4
-rw-r--r--src/input_common/drivers/mouse.cpp2
-rw-r--r--src/input_common/drivers/mouse.h4
-rw-r--r--src/input_common/drivers/sdl_driver.cpp2
-rw-r--r--src/input_common/drivers/sdl_driver.h12
-rw-r--r--src/input_common/drivers/tas_input.cpp2
-rw-r--r--src/input_common/drivers/tas_input.h6
-rw-r--r--src/input_common/drivers/touch_screen.cpp2
-rw-r--r--src/input_common/drivers/touch_screen.h4
-rw-r--r--src/input_common/drivers/udp_client.cpp2
-rw-r--r--src/input_common/drivers/udp_client.h6
-rw-r--r--src/input_common/input_engine.h2
15 files changed, 29 insertions, 29 deletions
diff --git a/src/input_common/drivers/gc_adapter.cpp b/src/input_common/drivers/gc_adapter.cpp
index 8b6574223..451147755 100644
--- a/src/input_common/drivers/gc_adapter.cpp
+++ b/src/input_common/drivers/gc_adapter.cpp
@@ -69,7 +69,7 @@ private:
69 libusb_device_handle* handle{}; 69 libusb_device_handle* handle{};
70}; 70};
71 71
72GCAdapter::GCAdapter(const std::string& input_engine_) : InputEngine(input_engine_) { 72GCAdapter::GCAdapter(std::string input_engine_) : InputEngine(std::move(input_engine_)) {
73 if (usb_adapter_handle) { 73 if (usb_adapter_handle) {
74 return; 74 return;
75 } 75 }
diff --git a/src/input_common/drivers/gc_adapter.h b/src/input_common/drivers/gc_adapter.h
index 8dc51d2e5..3c4f0396c 100644
--- a/src/input_common/drivers/gc_adapter.h
+++ b/src/input_common/drivers/gc_adapter.h
@@ -22,10 +22,10 @@ namespace InputCommon {
22class LibUSBContext; 22class LibUSBContext;
23class LibUSBDeviceHandle; 23class LibUSBDeviceHandle;
24 24
25class GCAdapter : public InputCommon::InputEngine { 25class GCAdapter : public InputEngine {
26public: 26public:
27 explicit GCAdapter(const std::string& input_engine_); 27 explicit GCAdapter(std::string input_engine_);
28 ~GCAdapter(); 28 ~GCAdapter() override;
29 29
30 Common::Input::VibrationError SetRumble( 30 Common::Input::VibrationError SetRumble(
31 const PadIdentifier& identifier, const Common::Input::VibrationStatus vibration) override; 31 const PadIdentifier& identifier, const Common::Input::VibrationStatus vibration) override;
diff --git a/src/input_common/drivers/keyboard.cpp b/src/input_common/drivers/keyboard.cpp
index 23b0c0ccf..4c1e5bbec 100644
--- a/src/input_common/drivers/keyboard.cpp
+++ b/src/input_common/drivers/keyboard.cpp
@@ -24,7 +24,7 @@ constexpr PadIdentifier keyboard_modifier_identifier = {
24 .pad = 1, 24 .pad = 1,
25}; 25};
26 26
27Keyboard::Keyboard(const std::string& input_engine_) : InputEngine(input_engine_) { 27Keyboard::Keyboard(std::string input_engine_) : InputEngine(std::move(input_engine_)) {
28 // Keyboard is broken into 3 diferent sets: 28 // Keyboard is broken into 3 diferent sets:
29 // key: Unfiltered intended for controllers. 29 // key: Unfiltered intended for controllers.
30 // keyboard_key: Allows only Settings::NativeKeyboard::Keys intended for keyboard emulation. 30 // keyboard_key: Allows only Settings::NativeKeyboard::Keys intended for keyboard emulation.
diff --git a/src/input_common/drivers/keyboard.h b/src/input_common/drivers/keyboard.h
index ad123b136..3856c882c 100644
--- a/src/input_common/drivers/keyboard.h
+++ b/src/input_common/drivers/keyboard.h
@@ -12,9 +12,9 @@ namespace InputCommon {
12 * A button device factory representing a keyboard. It receives keyboard events and forward them 12 * A button device factory representing a keyboard. It receives keyboard events and forward them
13 * to all button devices it created. 13 * to all button devices it created.
14 */ 14 */
15class Keyboard final : public InputCommon::InputEngine { 15class Keyboard final : public InputEngine {
16public: 16public:
17 explicit Keyboard(const std::string& input_engine_); 17 explicit Keyboard(std::string input_engine_);
18 18
19 /** 19 /**
20 * Sets the status of all buttons bound with the key to pressed 20 * Sets the status of all buttons bound with the key to pressed
diff --git a/src/input_common/drivers/mouse.cpp b/src/input_common/drivers/mouse.cpp
index 752118e97..aa69216c8 100644
--- a/src/input_common/drivers/mouse.cpp
+++ b/src/input_common/drivers/mouse.cpp
@@ -24,7 +24,7 @@ constexpr PadIdentifier identifier = {
24 .pad = 0, 24 .pad = 0,
25}; 25};
26 26
27Mouse::Mouse(const std::string& input_engine_) : InputEngine(input_engine_) { 27Mouse::Mouse(std::string input_engine_) : InputEngine(std::move(input_engine_)) {
28 PreSetController(identifier); 28 PreSetController(identifier);
29 PreSetAxis(identifier, mouse_axis_x); 29 PreSetAxis(identifier, mouse_axis_x);
30 PreSetAxis(identifier, mouse_axis_y); 30 PreSetAxis(identifier, mouse_axis_y);
diff --git a/src/input_common/drivers/mouse.h b/src/input_common/drivers/mouse.h
index 4a1fd2fd9..040446178 100644
--- a/src/input_common/drivers/mouse.h
+++ b/src/input_common/drivers/mouse.h
@@ -27,9 +27,9 @@ enum class MouseButton {
27 * A button device factory representing a keyboard. It receives keyboard events and forward them 27 * A button device factory representing a keyboard. It receives keyboard events and forward them
28 * to all button devices it created. 28 * to all button devices it created.
29 */ 29 */
30class Mouse final : public InputCommon::InputEngine { 30class Mouse final : public InputEngine {
31public: 31public:
32 explicit Mouse(const std::string& input_engine_); 32 explicit Mouse(std::string input_engine_);
33 33
34 /** 34 /**
35 * Signals that mouse has moved. 35 * Signals that mouse has moved.
diff --git a/src/input_common/drivers/sdl_driver.cpp b/src/input_common/drivers/sdl_driver.cpp
index 1052ed394..1bae6cdc8 100644
--- a/src/input_common/drivers/sdl_driver.cpp
+++ b/src/input_common/drivers/sdl_driver.cpp
@@ -387,7 +387,7 @@ void SDLDriver::CloseJoysticks() {
387 joystick_map.clear(); 387 joystick_map.clear();
388} 388}
389 389
390SDLDriver::SDLDriver(const std::string& input_engine_) : InputEngine(input_engine_) { 390SDLDriver::SDLDriver(std::string input_engine_) : InputEngine(std::move(input_engine_)) {
391 if (!Settings::values.enable_raw_input) { 391 if (!Settings::values.enable_raw_input) {
392 // Disable raw input. When enabled this setting causes SDL to die when a web applet opens 392 // Disable raw input. When enabled this setting causes SDL to die when a web applet opens
393 SDL_SetHint(SDL_HINT_JOYSTICK_RAWINPUT, "0"); 393 SDL_SetHint(SDL_HINT_JOYSTICK_RAWINPUT, "0");
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;
19using SDL_Joystick = struct _SDL_Joystick; 19using SDL_Joystick = struct _SDL_Joystick;
20using SDL_JoystickID = s32; 20using SDL_JoystickID = s32;
21 21
22namespace InputCommon {
23
24class SDLJoystick;
25
22using ButtonBindings = 26using ButtonBindings =
23 std::array<std::pair<Settings::NativeButton::Values, SDL_GameControllerButton>, 17>; 27 std::array<std::pair<Settings::NativeButton::Values, SDL_GameControllerButton>, 17>;
24using ZButtonBindings = 28using 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
27namespace InputCommon { 31class SDLDriver : public InputEngine {
28
29class SDLJoystick;
30
31class SDLDriver : public InputCommon::InputEngine {
32public: 32public:
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;
diff --git a/src/input_common/drivers/tas_input.cpp b/src/input_common/drivers/tas_input.cpp
index 0e01fb0d9..a2bedc951 100644
--- a/src/input_common/drivers/tas_input.cpp
+++ b/src/input_common/drivers/tas_input.cpp
@@ -47,7 +47,7 @@ constexpr std::array<std::pair<std::string_view, TasButton>, 20> text_to_tas_but
47 {"KEY_ZR", TasButton::TRIGGER_ZR}, 47 {"KEY_ZR", TasButton::TRIGGER_ZR},
48}; 48};
49 49
50Tas::Tas(const std::string& input_engine_) : InputCommon::InputEngine(input_engine_) { 50Tas::Tas(std::string input_engine_) : InputEngine(std::move(input_engine_)) {
51 for (size_t player_index = 0; player_index < PLAYER_NUMBER; player_index++) { 51 for (size_t player_index = 0; player_index < PLAYER_NUMBER; player_index++) {
52 PadIdentifier identifier{ 52 PadIdentifier identifier{
53 .guid = Common::UUID{}, 53 .guid = Common::UUID{},
diff --git a/src/input_common/drivers/tas_input.h b/src/input_common/drivers/tas_input.h
index c95a130fc..9a7f98727 100644
--- a/src/input_common/drivers/tas_input.h
+++ b/src/input_common/drivers/tas_input.h
@@ -81,10 +81,10 @@ enum class TasState {
81 Stopped, 81 Stopped,
82}; 82};
83 83
84class Tas final : public InputCommon::InputEngine { 84class Tas final : public InputEngine {
85public: 85public:
86 explicit Tas(const std::string& input_engine_); 86 explicit Tas(std::string input_engine_);
87 ~Tas(); 87 ~Tas() override;
88 88
89 /** 89 /**
90 * Changes the input status that will be stored in each frame 90 * Changes the input status that will be stored in each frame
diff --git a/src/input_common/drivers/touch_screen.cpp b/src/input_common/drivers/touch_screen.cpp
index 45b3086f6..880781825 100644
--- a/src/input_common/drivers/touch_screen.cpp
+++ b/src/input_common/drivers/touch_screen.cpp
@@ -13,7 +13,7 @@ constexpr PadIdentifier identifier = {
13 .pad = 0, 13 .pad = 0,
14}; 14};
15 15
16TouchScreen::TouchScreen(const std::string& input_engine_) : InputEngine(input_engine_) { 16TouchScreen::TouchScreen(std::string input_engine_) : InputEngine(std::move(input_engine_)) {
17 PreSetController(identifier); 17 PreSetController(identifier);
18} 18}
19 19
diff --git a/src/input_common/drivers/touch_screen.h b/src/input_common/drivers/touch_screen.h
index 25c11e8bf..bf395c40b 100644
--- a/src/input_common/drivers/touch_screen.h
+++ b/src/input_common/drivers/touch_screen.h
@@ -12,9 +12,9 @@ namespace InputCommon {
12 * A button device factory representing a keyboard. It receives keyboard events and forward them 12 * A button device factory representing a keyboard. It receives keyboard events and forward them
13 * to all button devices it created. 13 * to all button devices it created.
14 */ 14 */
15class TouchScreen final : public InputCommon::InputEngine { 15class TouchScreen final : public InputEngine {
16public: 16public:
17 explicit TouchScreen(const std::string& input_engine_); 17 explicit TouchScreen(std::string input_engine_);
18 18
19 /** 19 /**
20 * Signals that mouse has moved. 20 * Signals that mouse has moved.
diff --git a/src/input_common/drivers/udp_client.cpp b/src/input_common/drivers/udp_client.cpp
index fdee0f2d5..4ab991a7d 100644
--- a/src/input_common/drivers/udp_client.cpp
+++ b/src/input_common/drivers/udp_client.cpp
@@ -136,7 +136,7 @@ static void SocketLoop(Socket* socket) {
136 socket->Loop(); 136 socket->Loop();
137} 137}
138 138
139UDPClient::UDPClient(const std::string& input_engine_) : InputEngine(input_engine_) { 139UDPClient::UDPClient(std::string input_engine_) : InputEngine(std::move(input_engine_)) {
140 LOG_INFO(Input, "Udp Initialization started"); 140 LOG_INFO(Input, "Udp Initialization started");
141 ReloadSockets(); 141 ReloadSockets();
142} 142}
diff --git a/src/input_common/drivers/udp_client.h b/src/input_common/drivers/udp_client.h
index 5d483f26b..1adc947c4 100644
--- a/src/input_common/drivers/udp_client.h
+++ b/src/input_common/drivers/udp_client.h
@@ -49,10 +49,10 @@ struct DeviceStatus {
49 * A button device factory representing a keyboard. It receives keyboard events and forward them 49 * A button device factory representing a keyboard. It receives keyboard events and forward them
50 * to all button devices it created. 50 * to all button devices it created.
51 */ 51 */
52class UDPClient final : public InputCommon::InputEngine { 52class UDPClient final : public InputEngine {
53public: 53public:
54 explicit UDPClient(const std::string& input_engine_); 54 explicit UDPClient(std::string input_engine_);
55 ~UDPClient(); 55 ~UDPClient() override;
56 56
57 void ReloadSockets(); 57 void ReloadSockets();
58 58
diff --git a/src/input_common/input_engine.h b/src/input_common/input_engine.h
index 44accd0be..b21adfabf 100644
--- a/src/input_common/input_engine.h
+++ b/src/input_common/input_engine.h
@@ -102,7 +102,7 @@ struct InputIdentifier {
102 102
103class InputEngine { 103class InputEngine {
104public: 104public:
105 explicit InputEngine(const std::string& input_engine_) : input_engine(input_engine_) {} 105 explicit InputEngine(std::string input_engine_) : input_engine{std::move(input_engine_)} {}
106 106
107 virtual ~InputEngine() = default; 107 virtual ~InputEngine() = default;
108 108