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 | 4 | ||||
| -rw-r--r-- | src/input_common/drivers/touch_screen.cpp | 2 | ||||
| -rw-r--r-- | src/input_common/drivers/udp_client.cpp | 4 | ||||
| -rw-r--r-- | src/input_common/drivers/udp_client.h | 2 |
7 files changed, 11 insertions, 11 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 f54b91f9d..5cf1987ad 100644 --- a/src/input_common/drivers/sdl_driver.cpp +++ b/src/input_common/drivers/sdl_driver.cpp | |||
| @@ -502,7 +502,7 @@ std::vector<Common::ParamPackage> SDLDriver::GetInputDevices() const { | |||
| 502 | Common::Input::VibrationError SDLDriver::SetRumble( | 502 | Common::Input::VibrationError SDLDriver::SetRumble( |
| 503 | const PadIdentifier& identifier, const Common::Input::VibrationStatus& vibration) { | 503 | const PadIdentifier& identifier, const Common::Input::VibrationStatus& vibration) { |
| 504 | const auto joystick = | 504 | const auto joystick = |
| 505 | GetSDLJoystickByGUID(identifier.guid.Format(), static_cast<int>(identifier.port)); | 505 | GetSDLJoystickByGUID(identifier.guid.RawString(), static_cast<int>(identifier.port)); |
| 506 | const auto process_amplitude_exp = [](f32 amplitude, f32 factor) { | 506 | const auto process_amplitude_exp = [](f32 amplitude, f32 factor) { |
| 507 | return (amplitude + std::pow(amplitude, factor)) * 0.5f * 0xFFFF; | 507 | return (amplitude + std::pow(amplitude, factor)) * 0.5f * 0xFFFF; |
| 508 | }; | 508 | }; |
| @@ -599,7 +599,7 @@ Common::ParamPackage SDLDriver::BuildParamPackageForAnalog(PadIdentifier identif | |||
| 599 | Common::ParamPackage params; | 599 | Common::ParamPackage params; |
| 600 | params.Set("engine", GetEngineName()); | 600 | params.Set("engine", GetEngineName()); |
| 601 | params.Set("port", static_cast<int>(identifier.port)); | 601 | params.Set("port", static_cast<int>(identifier.port)); |
| 602 | params.Set("guid", identifier.guid.Format()); | 602 | params.Set("guid", identifier.guid.RawString()); |
| 603 | params.Set("axis_x", axis_x); | 603 | params.Set("axis_x", axis_x); |
| 604 | params.Set("axis_y", axis_y); | 604 | params.Set("axis_y", axis_y); |
| 605 | params.Set("offset_x", offset_x); | 605 | params.Set("offset_x", 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 333173e3d..64162f431 100644 --- a/src/input_common/drivers/udp_client.cpp +++ b/src/input_common/drivers/udp_client.cpp | |||
| @@ -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); |
diff --git a/src/input_common/drivers/udp_client.h b/src/input_common/drivers/udp_client.h index e9c178139..76e32bd04 100644 --- a/src/input_common/drivers/udp_client.h +++ b/src/input_common/drivers/udp_client.h | |||
| @@ -126,7 +126,7 @@ private: | |||
| 126 | struct ClientConnection { | 126 | struct ClientConnection { |
| 127 | ClientConnection(); | 127 | ClientConnection(); |
| 128 | ~ClientConnection(); | 128 | ~ClientConnection(); |
| 129 | Common::UUID uuid{"7F000001"}; | 129 | Common::UUID uuid{"00000000-0000-0000-0000-00007F000001"}; |
| 130 | std::string host{"127.0.0.1"}; | 130 | std::string host{"127.0.0.1"}; |
| 131 | u16 port{26760}; | 131 | u16 port{26760}; |
| 132 | s8 active{-1}; | 132 | s8 active{-1}; |