From 8bd246032af3e93e05535d8cc2e4ad312a664050 Mon Sep 17 00:00:00 2001 From: lat9nq Date: Mon, 26 Oct 2020 21:42:11 -0400 Subject: kernel: Use the current time as the default RNG seed Use the current time, not zero, as the default RNG seed. --- src/core/hle/kernel/process.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') 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::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 distribution; std::generate(process->random_entropy.begin(), process->random_entropy.end(), [&] { return distribution(rng); }); -- cgit v1.2.3