input/hid: Migrate to the new UUID implementation

This commit is contained in:
Morph 2022-02-05 00:40:28 -05:00
parent 3271099fea
commit cb30fe50cd
16 changed files with 57 additions and 56 deletions

View file

@ -351,10 +351,10 @@ PadIdentifier UDPClient::GetPadIdentifier(std::size_t pad_index) const {
};
}
Common::UUID UDPClient::GetHostUUID(const std::string& host) const {
Common::NewUUID UDPClient::GetHostUUID(const std::string& host) const {
const auto ip = boost::asio::ip::make_address_v4(host);
const auto hex_host = fmt::format("{:06x}", ip.to_uint());
return Common::UUID{hex_host};
const auto hex_host = fmt::format("00000000-0000-0000-0000-0000{:06x}", ip.to_uint());
return Common::NewUUID{hex_host};
}
void UDPClient::Reset() {
@ -385,7 +385,7 @@ std::vector<Common::ParamPackage> UDPClient::GetInputDevices() const {
Common::ParamPackage identifier{};
identifier.Set("engine", GetEngineName());
identifier.Set("display", fmt::format("UDP Controller {}", pad_identifier.pad));
identifier.Set("guid", pad_identifier.guid.Format());
identifier.Set("guid", pad_identifier.guid.RawString());
identifier.Set("port", static_cast<int>(pad_identifier.port));
identifier.Set("pad", static_cast<int>(pad_identifier.pad));
devices.emplace_back(identifier);