summaryrefslogtreecommitdiffstats
path: root/src/input_common/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'src/input_common/drivers')
-rw-r--r--src/input_common/drivers/keyboard.cpp6
-rw-r--r--src/input_common/drivers/keyboard.h7
-rw-r--r--src/input_common/drivers/mouse.cpp5
-rw-r--r--src/input_common/drivers/mouse.h5
-rw-r--r--src/input_common/drivers/touch_screen.cpp6
-rw-r--r--src/input_common/drivers/touch_screen.h8
6 files changed, 18 insertions, 19 deletions
diff --git a/src/input_common/drivers/keyboard.cpp b/src/input_common/drivers/keyboard.cpp
index 85a781a30..549704e89 100644
--- a/src/input_common/drivers/keyboard.cpp
+++ b/src/input_common/drivers/keyboard.cpp
@@ -7,6 +7,12 @@
namespace InputCommon {
+constexpr PadIdentifier identifier = {
+ .guid = Common::UUID{Common::INVALID_UUID},
+ .port = 0,
+ .pad = 0,
+};
+
Keyboard::Keyboard(const std::string& input_engine_) : InputEngine(input_engine_) {
PreSetController(identifier);
}
diff --git a/src/input_common/drivers/keyboard.h b/src/input_common/drivers/keyboard.h
index 58df15050..46fe78576 100644
--- a/src/input_common/drivers/keyboard.h
+++ b/src/input_common/drivers/keyboard.h
@@ -32,13 +32,6 @@ public:
/// Used for automapping features
std::vector<Common::ParamPackage> GetInputDevices() const override;
-
-private:
- const PadIdentifier identifier = {
- .guid = Common::UUID{Common::INVALID_UUID},
- .port = 0,
- .pad = 0,
- };
};
} // namespace InputCommon
diff --git a/src/input_common/drivers/mouse.cpp b/src/input_common/drivers/mouse.cpp
index 1c32b54be..afa92b458 100644
--- a/src/input_common/drivers/mouse.cpp
+++ b/src/input_common/drivers/mouse.cpp
@@ -14,6 +14,11 @@
namespace InputCommon {
constexpr int touch_axis_x = 10;
constexpr int touch_axis_y = 11;
+constexpr PadIdentifier identifier = {
+ .guid = Common::UUID{Common::INVALID_UUID},
+ .port = 0,
+ .pad = 0,
+};
Mouse::Mouse(const std::string input_engine_) : InputEngine(input_engine_) {
PreSetController(identifier);
diff --git a/src/input_common/drivers/mouse.h b/src/input_common/drivers/mouse.h
index cf0918409..1be362b94 100644
--- a/src/input_common/drivers/mouse.h
+++ b/src/input_common/drivers/mouse.h
@@ -62,11 +62,6 @@ private:
void UpdateThread(std::stop_token stop_token);
void StopPanning();
- const PadIdentifier identifier = {
- .guid = Common::UUID{Common::INVALID_UUID},
- .port = 0,
- .pad = 0,
- };
Common::Vec2<int> mouse_origin;
Common::Vec2<int> last_mouse_position;
Common::Vec2<float> last_mouse_change;
diff --git a/src/input_common/drivers/touch_screen.cpp b/src/input_common/drivers/touch_screen.cpp
index e13835e9f..377c9ee2b 100644
--- a/src/input_common/drivers/touch_screen.cpp
+++ b/src/input_common/drivers/touch_screen.cpp
@@ -7,6 +7,12 @@
namespace InputCommon {
+constexpr PadIdentifier identifier = {
+ .guid = Common::UUID{Common::INVALID_UUID},
+ .port = 0,
+ .pad = 0,
+};
+
TouchScreen::TouchScreen(const std::string input_engine_) : InputEngine(input_engine_) {
PreSetController(identifier);
}
diff --git a/src/input_common/drivers/touch_screen.h b/src/input_common/drivers/touch_screen.h
index d297d253c..0f4cd0e7a 100644
--- a/src/input_common/drivers/touch_screen.h
+++ b/src/input_common/drivers/touch_screen.h
@@ -37,14 +37,8 @@ public:
*/
void TouchReleased(std::size_t finger);
+ /// Resets all inputs to their initial value
void ReleaseAllTouch();
-
-private:
- const PadIdentifier identifier = {
- .guid = Common::UUID{Common::INVALID_UUID},
- .port = 0,
- .pad = 0,
- };
};
} // namespace InputCommon