diff options
author | David Marcec <dmarcecguzman@gmail.com> | 2018-08-11 18:31:43 +0200 |
---|---|---|
committer | David Marcec <dmarcecguzman@gmail.com> | 2018-08-11 18:31:43 +0200 |
commit | 10f494eefead7b2da17d8095abdfaad9ff9290fb (patch) | |
tree | 268b35667b3d77f1eb12940f9f66fb4894de82d1 /src/core/hle | |
parent | Removed un-needed count from ListOpenUsers and ListAllUsers (diff) | |
download | yuzu-10f494eefead7b2da17d8095abdfaad9ff9290fb.tar yuzu-10f494eefead7b2da17d8095abdfaad9ff9290fb.tar.gz yuzu-10f494eefead7b2da17d8095abdfaad9ff9290fb.tar.bz2 yuzu-10f494eefead7b2da17d8095abdfaad9ff9290fb.tar.lz yuzu-10f494eefead7b2da17d8095abdfaad9ff9290fb.tar.xz yuzu-10f494eefead7b2da17d8095abdfaad9ff9290fb.tar.zst yuzu-10f494eefead7b2da17d8095abdfaad9ff9290fb.zip |
Diffstat (limited to 'src/core/hle')
-rw-r--r-- | src/core/hle/service/acc/profile_manager.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/core/hle/service/acc/profile_manager.h b/src/core/hle/service/acc/profile_manager.h index 908519095..314bccbf9 100644 --- a/src/core/hle/service/acc/profile_manager.h +++ b/src/core/hle/service/acc/profile_manager.h @@ -5,6 +5,7 @@ #pragma once #include <array> +#include <random> #include "boost/optional.hpp" #include "common/common_types.h" #include "common/swap.h" @@ -38,8 +39,12 @@ struct UUID { // TODO(ogniK): Properly generate uuids based on RFC-4122 const UUID& Generate() { - uuid[0] = (static_cast<u64>(std::rand()) << 32) | std::rand(); - uuid[1] = (static_cast<u64>(std::rand()) << 32) | std::rand(); + std::random_device device; + std::mt19937 gen(device()); + std::uniform_int_distribution<uint64_t> distribution(1, + std::numeric_limits<uint64_t>::max()); + uuid[0] = distribution(gen); + uuid[1] = distribution(gen); return *this; } |