summaryrefslogtreecommitdiff
path: root/src/core/hle/kernel/process.cpp
diff options
context:
space:
mode:
authorGravatar lat9nq2020-10-26 21:42:11 -0400
committerGravatar lat9nq2020-10-26 21:42:11 -0400
commit8bd246032af3e93e05535d8cc2e4ad312a664050 (patch)
treea106597dfacba7789d091efda26bc3b2823ddb7a /src/core/hle/kernel/process.cpp
parentMerge pull request #4827 from lioncash/trunc (diff)
downloadyuzu-8bd246032af3e93e05535d8cc2e4ad312a664050.tar.gz
yuzu-8bd246032af3e93e05535d8cc2e4ad312a664050.tar.xz
yuzu-8bd246032af3e93e05535d8cc2e4ad312a664050.zip
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.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/hle/kernel/process.cpp b/src/core/hle/kernel/process.cpp
index ff9d9248b..4cc77c635 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,
123 : kernel.CreateNewUserProcessID(); 123 : kernel.CreateNewUserProcessID();
124 process->capabilities.InitializeForMetadatalessProcess(); 124 process->capabilities.InitializeForMetadatalessProcess();
125 125
126 std::mt19937 rng(Settings::values.rng_seed.GetValue().value_or(0)); 126 std::mt19937 rng(Settings::values.rng_seed.GetValue().value_or(std::time(nullptr)));
127 std::uniform_int_distribution<u64> distribution; 127 std::uniform_int_distribution<u64> distribution;
128 std::generate(process->random_entropy.begin(), process->random_entropy.end(), 128 std::generate(process->random_entropy.begin(), process->random_entropy.end(),
129 [&] { return distribution(rng); }); 129 [&] { return distribution(rng); });