diff options
| author | lat9nq <lat9nq@virginia.edu> | 2020-10-26 21:42:11 -0400 |
|---|---|---|
| committer | lat9nq <lat9nq@virginia.edu> | 2020-10-26 21:42:11 -0400 |
| commit | 2974d72a2a62f6c67639c4ac0f26ce4a1f4fa929 (patch) | |
| tree | a106597dfacba7789d091efda26bc3b2823ddb7a /src/core/hle/kernel/process.cpp | |
| parent | 77894160429d7054eaa7269bcad7c61246d115b4 (diff) | |
kernel: Use the current time as the default RNG seed
Use the current time, not zero, as the default RNG seed.
Diffstat (limited to 'src/core/hle/kernel/process.cpp')
| -rw-r--r-- | src/core/hle/kernel/process.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/hle/kernel/process.cpp b/src/core/hle/kernel/process.cpp index ff9d9248b0..4cc77c6353 100644 --- a/src/core/hle/kernel/process.cpp +++ b/src/core/hle/kernel/process.cpp @@ -123,7 +123,7 @@ std::shared_ptr<Process> Process::Create(Core::System& system, std::string name, : kernel.CreateNewUserProcessID(); process->capabilities.InitializeForMetadatalessProcess(); - std::mt19937 rng(Settings::values.rng_seed.GetValue().value_or(0)); + std::mt19937 rng(Settings::values.rng_seed.GetValue().value_or(std::time(nullptr))); std::uniform_int_distribution<u64> distribution; std::generate(process->random_entropy.begin(), process->random_entropy.end(), [&] { return distribution(rng); }); |
