diff options
Diffstat (limited to 'src/input_common/drivers/udp_client.cpp')
| -rw-r--r-- | src/input_common/drivers/udp_client.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/input_common/drivers/udp_client.cpp b/src/input_common/drivers/udp_client.cpp index 333173e3d..9780ead10 100644 --- a/src/input_common/drivers/udp_client.cpp +++ b/src/input_common/drivers/udp_client.cpp | |||
| @@ -192,22 +192,22 @@ std::size_t UDPClient::GetClientNumber(std::string_view host, u16 port) const { | |||
| 192 | return MAX_UDP_CLIENTS; | 192 | return MAX_UDP_CLIENTS; |
| 193 | } | 193 | } |
| 194 | 194 | ||
| 195 | BatteryLevel UDPClient::GetBatteryLevel(Response::Battery battery) const { | 195 | Common::Input::BatteryLevel UDPClient::GetBatteryLevel(Response::Battery battery) const { |
| 196 | switch (battery) { | 196 | switch (battery) { |
| 197 | case Response::Battery::Dying: | 197 | case Response::Battery::Dying: |
| 198 | return BatteryLevel::Empty; | 198 | return Common::Input::BatteryLevel::Empty; |
| 199 | case Response::Battery::Low: | 199 | case Response::Battery::Low: |
| 200 | return BatteryLevel::Critical; | 200 | return Common::Input::BatteryLevel::Critical; |
| 201 | case Response::Battery::Medium: | 201 | case Response::Battery::Medium: |
| 202 | return BatteryLevel::Low; | 202 | return Common::Input::BatteryLevel::Low; |
| 203 | case Response::Battery::High: | 203 | case Response::Battery::High: |
| 204 | return BatteryLevel::Medium; | 204 | return Common::Input::BatteryLevel::Medium; |
| 205 | case Response::Battery::Full: | 205 | case Response::Battery::Full: |
| 206 | case Response::Battery::Charged: | 206 | case Response::Battery::Charged: |
| 207 | return BatteryLevel::Full; | 207 | return Common::Input::BatteryLevel::Full; |
| 208 | case Response::Battery::Charging: | 208 | case Response::Battery::Charging: |
| 209 | default: | 209 | default: |
| 210 | return BatteryLevel::Charging; | 210 | return Common::Input::BatteryLevel::Charging; |
| 211 | } | 211 | } |
| 212 | } | 212 | } |
| 213 | 213 | ||
| @@ -353,7 +353,7 @@ PadIdentifier UDPClient::GetPadIdentifier(std::size_t pad_index) const { | |||
| 353 | 353 | ||
| 354 | Common::UUID UDPClient::GetHostUUID(const std::string& host) const { | 354 | Common::UUID UDPClient::GetHostUUID(const std::string& host) const { |
| 355 | const auto ip = boost::asio::ip::make_address_v4(host); | 355 | const auto ip = boost::asio::ip::make_address_v4(host); |
| 356 | const auto hex_host = fmt::format("{:06x}", ip.to_uint()); | 356 | const auto hex_host = fmt::format("00000000-0000-0000-0000-0000{:06x}", ip.to_uint()); |
| 357 | return Common::UUID{hex_host}; | 357 | return Common::UUID{hex_host}; |
| 358 | } | 358 | } |
| 359 | 359 | ||
| @@ -385,7 +385,7 @@ std::vector<Common::ParamPackage> UDPClient::GetInputDevices() const { | |||
| 385 | Common::ParamPackage identifier{}; | 385 | Common::ParamPackage identifier{}; |
| 386 | identifier.Set("engine", GetEngineName()); | 386 | identifier.Set("engine", GetEngineName()); |
| 387 | identifier.Set("display", fmt::format("UDP Controller {}", pad_identifier.pad)); | 387 | identifier.Set("display", fmt::format("UDP Controller {}", pad_identifier.pad)); |
| 388 | identifier.Set("guid", pad_identifier.guid.Format()); | 388 | identifier.Set("guid", pad_identifier.guid.RawString()); |
| 389 | identifier.Set("port", static_cast<int>(pad_identifier.port)); | 389 | identifier.Set("port", static_cast<int>(pad_identifier.port)); |
| 390 | identifier.Set("pad", static_cast<int>(pad_identifier.pad)); | 390 | identifier.Set("pad", static_cast<int>(pad_identifier.pad)); |
| 391 | devices.emplace_back(identifier); | 391 | devices.emplace_back(identifier); |