diff options
Diffstat (limited to 'src/input_common/drivers')
| -rw-r--r-- | src/input_common/drivers/gc_adapter.cpp | 2 | ||||
| -rw-r--r-- | src/input_common/drivers/keyboard.cpp | 6 | ||||
| -rw-r--r-- | src/input_common/drivers/mouse.cpp | 2 | ||||
| -rw-r--r-- | src/input_common/drivers/sdl_driver.cpp | 28 | ||||
| -rw-r--r-- | src/input_common/drivers/touch_screen.cpp | 2 | ||||
| -rw-r--r-- | src/input_common/drivers/udp_client.cpp | 33 | ||||
| -rw-r--r-- | src/input_common/drivers/udp_client.h | 8 |
7 files changed, 48 insertions, 33 deletions
diff --git a/src/input_common/drivers/gc_adapter.cpp b/src/input_common/drivers/gc_adapter.cpp index 7ab4540a8..155caae42 100644 --- a/src/input_common/drivers/gc_adapter.cpp +++ b/src/input_common/drivers/gc_adapter.cpp | |||
| @@ -248,7 +248,7 @@ bool GCAdapter::Setup() { | |||
| 248 | std::size_t port = 0; | 248 | std::size_t port = 0; |
| 249 | for (GCController& pad : pads) { | 249 | for (GCController& pad : pads) { |
| 250 | pad.identifier = { | 250 | pad.identifier = { |
| 251 | .guid = Common::UUID{Common::INVALID_UUID}, | 251 | .guid = Common::UUID{}, |
| 252 | .port = port++, | 252 | .port = port++, |
| 253 | .pad = 0, | 253 | .pad = 0, |
| 254 | }; | 254 | }; |
diff --git a/src/input_common/drivers/keyboard.cpp b/src/input_common/drivers/keyboard.cpp index 4c1e5bbec..59e3d9cc0 100644 --- a/src/input_common/drivers/keyboard.cpp +++ b/src/input_common/drivers/keyboard.cpp | |||
| @@ -9,17 +9,17 @@ | |||
| 9 | namespace InputCommon { | 9 | namespace InputCommon { |
| 10 | 10 | ||
| 11 | constexpr PadIdentifier key_identifier = { | 11 | constexpr PadIdentifier key_identifier = { |
| 12 | .guid = Common::UUID{Common::INVALID_UUID}, | 12 | .guid = Common::UUID{}, |
| 13 | .port = 0, | 13 | .port = 0, |
| 14 | .pad = 0, | 14 | .pad = 0, |
| 15 | }; | 15 | }; |
| 16 | constexpr PadIdentifier keyboard_key_identifier = { | 16 | constexpr PadIdentifier keyboard_key_identifier = { |
| 17 | .guid = Common::UUID{Common::INVALID_UUID}, | 17 | .guid = Common::UUID{}, |
| 18 | .port = 1, | 18 | .port = 1, |
| 19 | .pad = 0, | 19 | .pad = 0, |
| 20 | }; | 20 | }; |
| 21 | constexpr PadIdentifier keyboard_modifier_identifier = { | 21 | constexpr PadIdentifier keyboard_modifier_identifier = { |
| 22 | .guid = Common::UUID{Common::INVALID_UUID}, | 22 | .guid = Common::UUID{}, |
| 23 | .port = 1, | 23 | .port = 1, |
| 24 | .pad = 1, | 24 | .pad = 1, |
| 25 | }; | 25 | }; |
diff --git a/src/input_common/drivers/mouse.cpp b/src/input_common/drivers/mouse.cpp index d8ae7f0c1..3c9a4e747 100644 --- a/src/input_common/drivers/mouse.cpp +++ b/src/input_common/drivers/mouse.cpp | |||
| @@ -20,7 +20,7 @@ constexpr int motion_wheel_y = 4; | |||
| 20 | constexpr int touch_axis_x = 10; | 20 | constexpr int touch_axis_x = 10; |
| 21 | constexpr int touch_axis_y = 11; | 21 | constexpr int touch_axis_y = 11; |
| 22 | constexpr PadIdentifier identifier = { | 22 | constexpr PadIdentifier identifier = { |
| 23 | .guid = Common::UUID{Common::INVALID_UUID}, | 23 | .guid = Common::UUID{}, |
| 24 | .port = 0, | 24 | .port = 0, |
| 25 | .pad = 0, | 25 | .pad = 0, |
| 26 | }; | 26 | }; |
diff --git a/src/input_common/drivers/sdl_driver.cpp b/src/input_common/drivers/sdl_driver.cpp index 577bf5c31..c17ea305e 100644 --- a/src/input_common/drivers/sdl_driver.cpp +++ b/src/input_common/drivers/sdl_driver.cpp | |||
| @@ -175,23 +175,23 @@ public: | |||
| 175 | return false; | 175 | return false; |
| 176 | } | 176 | } |
| 177 | 177 | ||
| 178 | BatteryLevel GetBatteryLevel() { | 178 | Common::Input::BatteryLevel GetBatteryLevel() { |
| 179 | const auto level = SDL_JoystickCurrentPowerLevel(sdl_joystick.get()); | 179 | const auto level = SDL_JoystickCurrentPowerLevel(sdl_joystick.get()); |
| 180 | switch (level) { | 180 | switch (level) { |
| 181 | case SDL_JOYSTICK_POWER_EMPTY: | 181 | case SDL_JOYSTICK_POWER_EMPTY: |
| 182 | return BatteryLevel::Empty; | 182 | return Common::Input::BatteryLevel::Empty; |
| 183 | case SDL_JOYSTICK_POWER_LOW: | 183 | case SDL_JOYSTICK_POWER_LOW: |
| 184 | return BatteryLevel::Critical; | 184 | return Common::Input::BatteryLevel::Low; |
| 185 | case SDL_JOYSTICK_POWER_MEDIUM: | 185 | case SDL_JOYSTICK_POWER_MEDIUM: |
| 186 | return BatteryLevel::Low; | 186 | return Common::Input::BatteryLevel::Medium; |
| 187 | case SDL_JOYSTICK_POWER_FULL: | 187 | case SDL_JOYSTICK_POWER_FULL: |
| 188 | return BatteryLevel::Medium; | ||
| 189 | case SDL_JOYSTICK_POWER_MAX: | 188 | case SDL_JOYSTICK_POWER_MAX: |
| 190 | return BatteryLevel::Full; | 189 | return Common::Input::BatteryLevel::Full; |
| 191 | case SDL_JOYSTICK_POWER_UNKNOWN: | ||
| 192 | case SDL_JOYSTICK_POWER_WIRED: | 190 | case SDL_JOYSTICK_POWER_WIRED: |
| 191 | return Common::Input::BatteryLevel::Charging; | ||
| 192 | case SDL_JOYSTICK_POWER_UNKNOWN: | ||
| 193 | default: | 193 | default: |
| 194 | return BatteryLevel::Charging; | 194 | return Common::Input::BatteryLevel::None; |
| 195 | } | 195 | } |
| 196 | } | 196 | } |
| 197 | 197 | ||
| @@ -352,6 +352,8 @@ void SDLDriver::HandleGameControllerEvent(const SDL_Event& event) { | |||
| 352 | if (const auto joystick = GetSDLJoystickBySDLID(event.jbutton.which)) { | 352 | if (const auto joystick = GetSDLJoystickBySDLID(event.jbutton.which)) { |
| 353 | const PadIdentifier identifier = joystick->GetPadIdentifier(); | 353 | const PadIdentifier identifier = joystick->GetPadIdentifier(); |
| 354 | SetButton(identifier, event.jbutton.button, true); | 354 | SetButton(identifier, event.jbutton.button, true); |
| 355 | // Battery doesn't trigger an event so just update every button press | ||
| 356 | SetBattery(identifier, joystick->GetBatteryLevel()); | ||
| 355 | } | 357 | } |
| 356 | break; | 358 | break; |
| 357 | } | 359 | } |
| @@ -503,7 +505,7 @@ std::vector<Common::ParamPackage> SDLDriver::GetInputDevices() const { | |||
| 503 | Common::Input::VibrationError SDLDriver::SetRumble( | 505 | Common::Input::VibrationError SDLDriver::SetRumble( |
| 504 | const PadIdentifier& identifier, const Common::Input::VibrationStatus& vibration) { | 506 | const PadIdentifier& identifier, const Common::Input::VibrationStatus& vibration) { |
| 505 | const auto joystick = | 507 | const auto joystick = |
| 506 | GetSDLJoystickByGUID(identifier.guid.Format(), static_cast<int>(identifier.port)); | 508 | GetSDLJoystickByGUID(identifier.guid.RawString(), static_cast<int>(identifier.port)); |
| 507 | const auto process_amplitude_exp = [](f32 amplitude, f32 factor) { | 509 | const auto process_amplitude_exp = [](f32 amplitude, f32 factor) { |
| 508 | return (amplitude + std::pow(amplitude, factor)) * 0.5f * 0xFFFF; | 510 | return (amplitude + std::pow(amplitude, factor)) * 0.5f * 0xFFFF; |
| 509 | }; | 511 | }; |
| @@ -600,7 +602,7 @@ Common::ParamPackage SDLDriver::BuildParamPackageForAnalog(PadIdentifier identif | |||
| 600 | Common::ParamPackage params; | 602 | Common::ParamPackage params; |
| 601 | params.Set("engine", GetEngineName()); | 603 | params.Set("engine", GetEngineName()); |
| 602 | params.Set("port", static_cast<int>(identifier.port)); | 604 | params.Set("port", static_cast<int>(identifier.port)); |
| 603 | params.Set("guid", identifier.guid.Format()); | 605 | params.Set("guid", identifier.guid.RawString()); |
| 604 | params.Set("axis_x", axis_x); | 606 | params.Set("axis_x", axis_x); |
| 605 | params.Set("axis_y", axis_y); | 607 | params.Set("axis_y", axis_y); |
| 606 | params.Set("offset_x", offset_x); | 608 | params.Set("offset_x", offset_x); |
| @@ -812,7 +814,7 @@ AnalogMapping SDLDriver::GetAnalogMappingForDevice(const Common::ParamPackage& p | |||
| 812 | PreSetAxis(identifier, binding_left_x.value.axis); | 814 | PreSetAxis(identifier, binding_left_x.value.axis); |
| 813 | PreSetAxis(identifier, binding_left_y.value.axis); | 815 | PreSetAxis(identifier, binding_left_y.value.axis); |
| 814 | const auto left_offset_x = -GetAxis(identifier, binding_left_x.value.axis); | 816 | const auto left_offset_x = -GetAxis(identifier, binding_left_x.value.axis); |
| 815 | const auto left_offset_y = -GetAxis(identifier, binding_left_y.value.axis); | 817 | const auto left_offset_y = GetAxis(identifier, binding_left_y.value.axis); |
| 816 | mapping.insert_or_assign(Settings::NativeAnalog::LStick, | 818 | mapping.insert_or_assign(Settings::NativeAnalog::LStick, |
| 817 | BuildParamPackageForAnalog(identifier, binding_left_x.value.axis, | 819 | BuildParamPackageForAnalog(identifier, binding_left_x.value.axis, |
| 818 | binding_left_y.value.axis, | 820 | binding_left_y.value.axis, |
| @@ -823,7 +825,7 @@ AnalogMapping SDLDriver::GetAnalogMappingForDevice(const Common::ParamPackage& p | |||
| 823 | PreSetAxis(identifier, binding_left_x.value.axis); | 825 | PreSetAxis(identifier, binding_left_x.value.axis); |
| 824 | PreSetAxis(identifier, binding_left_y.value.axis); | 826 | PreSetAxis(identifier, binding_left_y.value.axis); |
| 825 | const auto left_offset_x = -GetAxis(identifier, binding_left_x.value.axis); | 827 | const auto left_offset_x = -GetAxis(identifier, binding_left_x.value.axis); |
| 826 | const auto left_offset_y = -GetAxis(identifier, binding_left_y.value.axis); | 828 | const auto left_offset_y = GetAxis(identifier, binding_left_y.value.axis); |
| 827 | mapping.insert_or_assign(Settings::NativeAnalog::LStick, | 829 | mapping.insert_or_assign(Settings::NativeAnalog::LStick, |
| 828 | BuildParamPackageForAnalog(identifier, binding_left_x.value.axis, | 830 | BuildParamPackageForAnalog(identifier, binding_left_x.value.axis, |
| 829 | binding_left_y.value.axis, | 831 | binding_left_y.value.axis, |
| @@ -838,7 +840,7 @@ AnalogMapping SDLDriver::GetAnalogMappingForDevice(const Common::ParamPackage& p | |||
| 838 | PreSetAxis(identifier, binding_right_x.value.axis); | 840 | PreSetAxis(identifier, binding_right_x.value.axis); |
| 839 | PreSetAxis(identifier, binding_right_y.value.axis); | 841 | PreSetAxis(identifier, binding_right_y.value.axis); |
| 840 | const auto right_offset_x = -GetAxis(identifier, binding_right_x.value.axis); | 842 | const auto right_offset_x = -GetAxis(identifier, binding_right_x.value.axis); |
| 841 | const auto right_offset_y = -GetAxis(identifier, binding_right_y.value.axis); | 843 | const auto right_offset_y = GetAxis(identifier, binding_right_y.value.axis); |
| 842 | mapping.insert_or_assign(Settings::NativeAnalog::RStick, | 844 | mapping.insert_or_assign(Settings::NativeAnalog::RStick, |
| 843 | BuildParamPackageForAnalog(identifier, binding_right_x.value.axis, | 845 | BuildParamPackageForAnalog(identifier, binding_right_x.value.axis, |
| 844 | binding_right_y.value.axis, right_offset_x, | 846 | binding_right_y.value.axis, right_offset_x, |
diff --git a/src/input_common/drivers/touch_screen.cpp b/src/input_common/drivers/touch_screen.cpp index 880781825..30c727df4 100644 --- a/src/input_common/drivers/touch_screen.cpp +++ b/src/input_common/drivers/touch_screen.cpp | |||
| @@ -8,7 +8,7 @@ | |||
| 8 | namespace InputCommon { | 8 | namespace InputCommon { |
| 9 | 9 | ||
| 10 | constexpr PadIdentifier identifier = { | 10 | constexpr PadIdentifier identifier = { |
| 11 | .guid = Common::UUID{Common::INVALID_UUID}, | 11 | .guid = Common::UUID{}, |
| 12 | .port = 0, | 12 | .port = 0, |
| 13 | .pad = 0, | 13 | .pad = 0, |
| 14 | }; | 14 | }; |
diff --git a/src/input_common/drivers/udp_client.cpp b/src/input_common/drivers/udp_client.cpp index d1cdb1ab2..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 | ||
| @@ -271,7 +271,7 @@ void UDPClient::OnPadData(Response::PadData data, std::size_t client) { | |||
| 271 | const auto touch_axis_y_id = | 271 | const auto touch_axis_y_id = |
| 272 | static_cast<int>(id == 0 ? PadAxes::Touch1Y : PadAxes::Touch2Y); | 272 | static_cast<int>(id == 0 ? PadAxes::Touch1Y : PadAxes::Touch2Y); |
| 273 | const auto touch_button_id = | 273 | const auto touch_button_id = |
| 274 | static_cast<int>(id == 0 ? PadButton::Touch1 : PadButton::touch2); | 274 | static_cast<int>(id == 0 ? PadButton::Touch1 : PadButton::Touch2); |
| 275 | 275 | ||
| 276 | // TODO: Use custom calibration per device | 276 | // TODO: Use custom calibration per device |
| 277 | const Common::ParamPackage touch_param(Settings::values.touch_device.GetValue()); | 277 | const Common::ParamPackage touch_param(Settings::values.touch_device.GetValue()); |
| @@ -319,6 +319,9 @@ void UDPClient::OnPadData(Response::PadData data, std::size_t client) { | |||
| 319 | SetButton(identifier, button, button_status); | 319 | SetButton(identifier, button, button_status); |
| 320 | } | 320 | } |
| 321 | 321 | ||
| 322 | SetButton(identifier, static_cast<int>(PadButton::Home), data.home != 0); | ||
| 323 | SetButton(identifier, static_cast<int>(PadButton::TouchHardPress), data.touch_hard_press != 0); | ||
| 324 | |||
| 322 | SetBattery(identifier, GetBatteryLevel(data.info.battery)); | 325 | SetBattery(identifier, GetBatteryLevel(data.info.battery)); |
| 323 | } | 326 | } |
| 324 | 327 | ||
| @@ -350,7 +353,7 @@ PadIdentifier UDPClient::GetPadIdentifier(std::size_t pad_index) const { | |||
| 350 | 353 | ||
| 351 | Common::UUID UDPClient::GetHostUUID(const std::string& host) const { | 354 | Common::UUID UDPClient::GetHostUUID(const std::string& host) const { |
| 352 | const auto ip = boost::asio::ip::make_address_v4(host); | 355 | const auto ip = boost::asio::ip::make_address_v4(host); |
| 353 | 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()); |
| 354 | return Common::UUID{hex_host}; | 357 | return Common::UUID{hex_host}; |
| 355 | } | 358 | } |
| 356 | 359 | ||
| @@ -382,7 +385,7 @@ std::vector<Common::ParamPackage> UDPClient::GetInputDevices() const { | |||
| 382 | Common::ParamPackage identifier{}; | 385 | Common::ParamPackage identifier{}; |
| 383 | identifier.Set("engine", GetEngineName()); | 386 | identifier.Set("engine", GetEngineName()); |
| 384 | identifier.Set("display", fmt::format("UDP Controller {}", pad_identifier.pad)); | 387 | identifier.Set("display", fmt::format("UDP Controller {}", pad_identifier.pad)); |
| 385 | identifier.Set("guid", pad_identifier.guid.Format()); | 388 | identifier.Set("guid", pad_identifier.guid.RawString()); |
| 386 | identifier.Set("port", static_cast<int>(pad_identifier.port)); | 389 | identifier.Set("port", static_cast<int>(pad_identifier.port)); |
| 387 | identifier.Set("pad", static_cast<int>(pad_identifier.pad)); | 390 | identifier.Set("pad", static_cast<int>(pad_identifier.pad)); |
| 388 | devices.emplace_back(identifier); | 391 | devices.emplace_back(identifier); |
| @@ -393,7 +396,7 @@ std::vector<Common::ParamPackage> UDPClient::GetInputDevices() const { | |||
| 393 | 396 | ||
| 394 | ButtonMapping UDPClient::GetButtonMappingForDevice(const Common::ParamPackage& params) { | 397 | ButtonMapping UDPClient::GetButtonMappingForDevice(const Common::ParamPackage& params) { |
| 395 | // This list excludes any button that can't be really mapped | 398 | // This list excludes any button that can't be really mapped |
| 396 | static constexpr std::array<std::pair<Settings::NativeButton::Values, PadButton>, 18> | 399 | static constexpr std::array<std::pair<Settings::NativeButton::Values, PadButton>, 20> |
| 397 | switch_to_dsu_button = { | 400 | switch_to_dsu_button = { |
| 398 | std::pair{Settings::NativeButton::A, PadButton::Circle}, | 401 | std::pair{Settings::NativeButton::A, PadButton::Circle}, |
| 399 | {Settings::NativeButton::B, PadButton::Cross}, | 402 | {Settings::NativeButton::B, PadButton::Cross}, |
| @@ -413,6 +416,8 @@ ButtonMapping UDPClient::GetButtonMappingForDevice(const Common::ParamPackage& p | |||
| 413 | {Settings::NativeButton::SR, PadButton::R2}, | 416 | {Settings::NativeButton::SR, PadButton::R2}, |
| 414 | {Settings::NativeButton::LStick, PadButton::L3}, | 417 | {Settings::NativeButton::LStick, PadButton::L3}, |
| 415 | {Settings::NativeButton::RStick, PadButton::R3}, | 418 | {Settings::NativeButton::RStick, PadButton::R3}, |
| 419 | {Settings::NativeButton::Home, PadButton::Home}, | ||
| 420 | {Settings::NativeButton::Screenshot, PadButton::TouchHardPress}, | ||
| 416 | }; | 421 | }; |
| 417 | if (!params.Has("guid") || !params.Has("port") || !params.Has("pad")) { | 422 | if (!params.Has("guid") || !params.Has("port") || !params.Has("pad")) { |
| 418 | return {}; | 423 | return {}; |
| @@ -517,6 +522,12 @@ Common::Input::ButtonNames UDPClient::GetUIButtonName(const Common::ParamPackage | |||
| 517 | return Common::Input::ButtonNames::Share; | 522 | return Common::Input::ButtonNames::Share; |
| 518 | case PadButton::Options: | 523 | case PadButton::Options: |
| 519 | return Common::Input::ButtonNames::Options; | 524 | return Common::Input::ButtonNames::Options; |
| 525 | case PadButton::Home: | ||
| 526 | return Common::Input::ButtonNames::Home; | ||
| 527 | case PadButton::Touch1: | ||
| 528 | case PadButton::Touch2: | ||
| 529 | case PadButton::TouchHardPress: | ||
| 530 | return Common::Input::ButtonNames::Touch; | ||
| 520 | default: | 531 | default: |
| 521 | return Common::Input::ButtonNames::Undefined; | 532 | return Common::Input::ButtonNames::Undefined; |
| 522 | } | 533 | } |
diff --git a/src/input_common/drivers/udp_client.h b/src/input_common/drivers/udp_client.h index 30d7c2682..c7cc7d846 100644 --- a/src/input_common/drivers/udp_client.h +++ b/src/input_common/drivers/udp_client.h | |||
| @@ -84,7 +84,9 @@ private: | |||
| 84 | Cross = 0x4000, | 84 | Cross = 0x4000, |
| 85 | Square = 0x8000, | 85 | Square = 0x8000, |
| 86 | Touch1 = 0x10000, | 86 | Touch1 = 0x10000, |
| 87 | touch2 = 0x20000, | 87 | Touch2 = 0x20000, |
| 88 | Home = 0x40000, | ||
| 89 | TouchHardPress = 0x80000, | ||
| 88 | }; | 90 | }; |
| 89 | 91 | ||
| 90 | enum class PadAxes : u8 { | 92 | enum class PadAxes : u8 { |
| @@ -124,7 +126,7 @@ private: | |||
| 124 | struct ClientConnection { | 126 | struct ClientConnection { |
| 125 | ClientConnection(); | 127 | ClientConnection(); |
| 126 | ~ClientConnection(); | 128 | ~ClientConnection(); |
| 127 | Common::UUID uuid{"7F000001"}; | 129 | Common::UUID uuid{"00000000-0000-0000-0000-00007F000001"}; |
| 128 | std::string host{"127.0.0.1"}; | 130 | std::string host{"127.0.0.1"}; |
| 129 | u16 port{26760}; | 131 | u16 port{26760}; |
| 130 | s8 active{-1}; | 132 | s8 active{-1}; |
| @@ -139,7 +141,7 @@ private: | |||
| 139 | std::size_t GetClientNumber(std::string_view host, u16 port) const; | 141 | std::size_t GetClientNumber(std::string_view host, u16 port) const; |
| 140 | 142 | ||
| 141 | // Translates UDP battery level to input engine battery level | 143 | // Translates UDP battery level to input engine battery level |
| 142 | BatteryLevel GetBatteryLevel(Response::Battery battery) const; | 144 | Common::Input::BatteryLevel GetBatteryLevel(Response::Battery battery) const; |
| 143 | 145 | ||
| 144 | void OnVersion(Response::Version); | 146 | void OnVersion(Response::Version); |
| 145 | void OnPortInfo(Response::PortInfo); | 147 | void OnPortInfo(Response::PortInfo); |