summaryrefslogtreecommitdiff
path: root/src/input_common/drivers/udp_client.cpp
diff options
context:
space:
mode:
authorGravatar Morph2022-02-05 00:40:28 -0500
committerGravatar Morph2022-02-05 13:18:41 -0500
commitcb30fe50cd074fe05dd1d6e4b0d58116d3d98489 (patch)
tree58450d743d317369266bbbea44734725d8b83ea6 /src/input_common/drivers/udp_client.cpp
parentcommon: Implement NewUUID (diff)
downloadyuzu-cb30fe50cd074fe05dd1d6e4b0d58116d3d98489.tar.gz
yuzu-cb30fe50cd074fe05dd1d6e4b0d58116d3d98489.tar.xz
yuzu-cb30fe50cd074fe05dd1d6e4b0d58116d3d98489.zip
input/hid: Migrate to the new UUID implementation
Diffstat (limited to 'src/input_common/drivers/udp_client.cpp')
-rw-r--r--src/input_common/drivers/udp_client.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/input_common/drivers/udp_client.cpp b/src/input_common/drivers/udp_client.cpp
index 333173e3d..cbcfa7a4b 100644
--- a/src/input_common/drivers/udp_client.cpp
+++ b/src/input_common/drivers/udp_client.cpp
@@ -351,10 +351,10 @@ PadIdentifier UDPClient::GetPadIdentifier(std::size_t pad_index) const {
351 }; 351 };
352} 352}
353 353
354Common::UUID UDPClient::GetHostUUID(const std::string& host) const { 354Common::NewUUID 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::NewUUID{hex_host};
358} 358}
359 359
360void UDPClient::Reset() { 360void UDPClient::Reset() {
@@ -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);