input/hid: Migrate to the new UUID implementation
This commit is contained in:
parent
77bc383079
commit
51c445f7e8
16 changed files with 57 additions and 56 deletions
|
@ -10,13 +10,13 @@
|
|||
|
||||
#include "common/common_types.h"
|
||||
#include "common/input.h"
|
||||
#include "common/new_uuid.h"
|
||||
#include "common/param_package.h"
|
||||
#include "common/uuid.h"
|
||||
#include "input_common/main.h"
|
||||
|
||||
// Pad Identifier of data source
|
||||
struct PadIdentifier {
|
||||
Common::UUID guid{Common::INVALID_UUID};
|
||||
Common::NewUUID guid{};
|
||||
std::size_t port{};
|
||||
std::size_t pad{};
|
||||
|
||||
|
@ -59,7 +59,7 @@ namespace std {
|
|||
template <>
|
||||
struct hash<PadIdentifier> {
|
||||
size_t operator()(const PadIdentifier& pad_id) const noexcept {
|
||||
u64 hash_value = pad_id.guid.uuid[1] ^ pad_id.guid.uuid[0];
|
||||
u64 hash_value = pad_id.guid.Hash();
|
||||
hash_value ^= (static_cast<u64>(pad_id.port) << 32);
|
||||
hash_value ^= static_cast<u64>(pad_id.pad);
|
||||
return static_cast<size_t>(hash_value);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue