diff options
author | bunnei <bunneidev@gmail.com> | 2022-01-22 10:28:14 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-22 10:28:14 +0100 |
commit | 8433edacb34be3e3db9462c91d91c4a78987871d (patch) | |
tree | 34116e9c9f4f6384c76641b893a90021e290c475 /src/input_common/drivers/udp_client.h | |
parent | Merge pull request #7737 from bunnei/fix-dummy-thread-leak (diff) | |
parent | input_common: Report battery for UDP controllers (diff) | |
download | yuzu-8433edacb34be3e3db9462c91d91c4a78987871d.tar yuzu-8433edacb34be3e3db9462c91d91c4a78987871d.tar.gz yuzu-8433edacb34be3e3db9462c91d91c4a78987871d.tar.bz2 yuzu-8433edacb34be3e3db9462c91d91c4a78987871d.tar.lz yuzu-8433edacb34be3e3db9462c91d91c4a78987871d.tar.xz yuzu-8433edacb34be3e3db9462c91d91c4a78987871d.tar.zst yuzu-8433edacb34be3e3db9462c91d91c4a78987871d.zip |
Diffstat (limited to '')
-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 { class Socket; namespace Response { +enum class Battery : u8; struct PadData; struct PortInfo; struct TouchPad; @@ -137,6 +138,9 @@ private: // Translates configuration to client number std::size_t GetClientNumber(std::string_view host, u16 port) const; + // Translates UDP battery level to input engine battery level + BatteryLevel GetBatteryLevel(Response::Battery battery) const; + void OnVersion(Response::Version); void OnPortInfo(Response::PortInfo); void OnPadData(Response::PadData, std::size_t client); |