diff options
| author | 2022-02-05 00:40:28 -0500 | |
|---|---|---|
| committer | 2022-02-05 13:18:41 -0500 | |
| commit | cb30fe50cd074fe05dd1d6e4b0d58116d3d98489 (patch) | |
| tree | 58450d743d317369266bbbea44734725d8b83ea6 /src/input_common/input_engine.h | |
| parent | common: Implement NewUUID (diff) | |
| download | yuzu-cb30fe50cd074fe05dd1d6e4b0d58116d3d98489.tar.gz yuzu-cb30fe50cd074fe05dd1d6e4b0d58116d3d98489.tar.xz yuzu-cb30fe50cd074fe05dd1d6e4b0d58116d3d98489.zip | |
input/hid: Migrate to the new UUID implementation
Diffstat (limited to 'src/input_common/input_engine.h')
| -rw-r--r-- | src/input_common/input_engine.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/input_common/input_engine.h b/src/input_common/input_engine.h index fe2faee5a..05e45b877 100644 --- a/src/input_common/input_engine.h +++ b/src/input_common/input_engine.h | |||
| @@ -10,13 +10,13 @@ | |||
| 10 | 10 | ||
| 11 | #include "common/common_types.h" | 11 | #include "common/common_types.h" |
| 12 | #include "common/input.h" | 12 | #include "common/input.h" |
| 13 | #include "common/new_uuid.h" | ||
| 13 | #include "common/param_package.h" | 14 | #include "common/param_package.h" |
| 14 | #include "common/uuid.h" | ||
| 15 | #include "input_common/main.h" | 15 | #include "input_common/main.h" |
| 16 | 16 | ||
| 17 | // Pad Identifier of data source | 17 | // Pad Identifier of data source |
| 18 | struct PadIdentifier { | 18 | struct PadIdentifier { |
| 19 | Common::UUID guid{Common::INVALID_UUID}; | 19 | Common::NewUUID guid{}; |
| 20 | std::size_t port{}; | 20 | std::size_t port{}; |
| 21 | std::size_t pad{}; | 21 | std::size_t pad{}; |
| 22 | 22 | ||
| @@ -59,7 +59,7 @@ namespace std { | |||
| 59 | template <> | 59 | template <> |
| 60 | struct hash<PadIdentifier> { | 60 | struct hash<PadIdentifier> { |
| 61 | size_t operator()(const PadIdentifier& pad_id) const noexcept { | 61 | size_t operator()(const PadIdentifier& pad_id) const noexcept { |
| 62 | u64 hash_value = pad_id.guid.uuid[1] ^ pad_id.guid.uuid[0]; | 62 | u64 hash_value = pad_id.guid.Hash(); |
| 63 | hash_value ^= (static_cast<u64>(pad_id.port) << 32); | 63 | hash_value ^= (static_cast<u64>(pad_id.port) << 32); |
| 64 | hash_value ^= static_cast<u64>(pad_id.pad); | 64 | hash_value ^= static_cast<u64>(pad_id.pad); |
| 65 | return static_cast<size_t>(hash_value); | 65 | return static_cast<size_t>(hash_value); |