VERY experimental Nintendo Switch 2 emulator
C++
common: uuid: Add AsU128()
Morphad33e58c2d9a
diff --git a/src/common/new_uuid.cpp b/src/common/new_uuid.cppindex 0442681c84..f2f0077aef 100644--- a/src/common/new_uuid.cpp+++ b/src/common/new_uuid.cpp@@ -144,6 +144,12 @@ size_t NewUUID::Hash() const noexcept {return hash ^ std::rotl(temp, 1);}+u128 NewUUID::AsU128() const {+ u128 uuid_old;+ std::memcpy(&uuid_old, uuid.data(), sizeof(NewUUID));+ return uuid_old;+}+NewUUID NewUUID::MakeRandom() {std::random_device device;diff --git a/src/common/new_uuid.h b/src/common/new_uuid.hindex bd4468ad23..44665ad5af 100644--- a/src/common/new_uuid.h+++ b/src/common/new_uuid.h@@ -83,6 +83,9 @@ struct NewUUID {*/size_t Hash() const noexcept;+ /// DO NOT USE. Copies the contents of the UUID into a u128.+ u128 AsU128() const;+/*** Creates a default UUID "yuzu Default UID".*