summaryrefslogtreecommitdiff
path: root/src/input_common/drivers/udp_client.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/input_common/drivers/udp_client.h')
-rw-r--r--src/input_common/drivers/udp_client.h56
1 files changed, 56 insertions, 0 deletions
diff --git a/src/input_common/drivers/udp_client.h b/src/input_common/drivers/udp_client.h
index 1f02adba5..5d483f26b 100644
--- a/src/input_common/drivers/udp_client.h
+++ b/src/input_common/drivers/udp_client.h
@@ -56,7 +56,61 @@ public:
56 56
57 void ReloadSockets(); 57 void ReloadSockets();
58 58
59 /// Used for automapping features
60 std::vector<Common::ParamPackage> GetInputDevices() const override;
61 ButtonMapping GetButtonMappingForDevice(const Common::ParamPackage& params) override;
62 AnalogMapping GetAnalogMappingForDevice(const Common::ParamPackage& params) override;
63 MotionMapping GetMotionMappingForDevice(const Common::ParamPackage& params) override;
64 Common::Input::ButtonNames GetUIName(const Common::ParamPackage& params) const override;
65
59private: 66private:
67 enum class PadButton {
68 Undefined = 0x0000,
69 Share = 0x0001,
70 L3 = 0x0002,
71 R3 = 0x0004,
72 Options = 0x0008,
73 Up = 0x0010,
74 Right = 0x0020,
75 Down = 0x0040,
76 Left = 0x0080,
77 L2 = 0x0100,
78 R2 = 0x0200,
79 L1 = 0x0400,
80 R1 = 0x0800,
81 Triangle = 0x1000,
82 Circle = 0x2000,
83 Cross = 0x4000,
84 Square = 0x8000,
85 Touch1 = 0x10000,
86 touch2 = 0x20000,
87 };
88
89 enum class PadAxes : u8 {
90 LeftStickX,
91 LeftStickY,
92 RightStickX,
93 RightStickY,
94 AnalogLeft,
95 AnalogDown,
96 AnalogRight,
97 AnalogUp,
98 AnalogSquare,
99 AnalogCross,
100 AnalogCircle,
101 AnalogTriangle,
102 AnalogR1,
103 AnalogL1,
104 AnalogR2,
105 AnalogL3,
106 AnalogR3,
107 Touch1X,
108 Touch1Y,
109 Touch2X,
110 Touch2Y,
111 Undefined,
112 };
113
60 struct PadData { 114 struct PadData {
61 std::size_t pad_index{}; 115 std::size_t pad_index{};
62 bool connected{}; 116 bool connected{};
@@ -90,6 +144,8 @@ private:
90 const PadIdentifier GetPadIdentifier(std::size_t pad_index) const; 144 const PadIdentifier GetPadIdentifier(std::size_t pad_index) const;
91 const Common::UUID GetHostUUID(const std::string host) const; 145 const Common::UUID GetHostUUID(const std::string host) const;
92 146
147 Common::Input::ButtonNames GetUIButtonName(const Common::ParamPackage& params) const;
148
93 // Allocate clients for 8 udp servers 149 // Allocate clients for 8 udp servers
94 static constexpr std::size_t MAX_UDP_CLIENTS = 8; 150 static constexpr std::size_t MAX_UDP_CLIENTS = 8;
95 static constexpr std::size_t PADS_PER_CLIENT = 4; 151 static constexpr std::size_t PADS_PER_CLIENT = 4;