diff options
| author | 2022-01-17 10:44:13 -0600 | |
|---|---|---|
| committer | 2022-01-17 13:30:15 -0600 | |
| commit | 36144a56905046d0dee1fd369f9eb4e130e18c35 (patch) | |
| tree | cb86bc935041681906403c6e227372a300f7643b /src/input_common/drivers/udp_client.h | |
| parent | Merge pull request #7713 from gidoly/patch-3 (diff) | |
| download | yuzu-36144a56905046d0dee1fd369f9eb4e130e18c35.tar.gz yuzu-36144a56905046d0dee1fd369f9eb4e130e18c35.tar.xz yuzu-36144a56905046d0dee1fd369f9eb4e130e18c35.zip | |
input_common: Report battery for UDP controllers
Diffstat (limited to 'src/input_common/drivers/udp_client.h')
| -rw-r--r-- | src/input_common/drivers/udp_client.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/input_common/drivers/udp_client.h b/src/input_common/drivers/udp_client.h index 1adc947c4..61a1fff37 100644 --- a/src/input_common/drivers/udp_client.h +++ b/src/input_common/drivers/udp_client.h | |||
| @@ -15,6 +15,7 @@ namespace InputCommon::CemuhookUDP { | |||
| 15 | class Socket; | 15 | class Socket; |
| 16 | 16 | ||
| 17 | namespace Response { | 17 | namespace Response { |
| 18 | enum class Battery : u8; | ||
| 18 | struct PadData; | 19 | struct PadData; |
| 19 | struct PortInfo; | 20 | struct PortInfo; |
| 20 | struct TouchPad; | 21 | struct TouchPad; |
| @@ -137,6 +138,9 @@ private: | |||
| 137 | // Translates configuration to client number | 138 | // Translates configuration to client number |
| 138 | std::size_t GetClientNumber(std::string_view host, u16 port) const; | 139 | std::size_t GetClientNumber(std::string_view host, u16 port) const; |
| 139 | 140 | ||
| 141 | // Translates UDP battery level to input engine battery level | ||
| 142 | BatteryLevel GetBatteryLevel(Response::Battery battery) const; | ||
| 143 | |||
| 140 | void OnVersion(Response::Version); | 144 | void OnVersion(Response::Version); |
| 141 | void OnPortInfo(Response::PortInfo); | 145 | void OnPortInfo(Response::PortInfo); |
| 142 | void OnPadData(Response::PadData, std::size_t client); | 146 | void OnPadData(Response::PadData, std::size_t client); |