diff options
Diffstat (limited to 'src/core')
| -rw-r--r-- | src/core/core.cpp | 4 | ||||
| -rw-r--r-- | src/core/hle/kernel/k_process.cpp | 3 | ||||
| -rw-r--r-- | src/core/hle/service/spl/spl_module.cpp | 3 |
3 files changed, 7 insertions, 3 deletions
diff --git a/src/core/core.cpp b/src/core/core.cpp index 9e3eb3795..da1baa892 100644 --- a/src/core/core.cpp +++ b/src/core/core.cpp | |||
| @@ -149,7 +149,9 @@ struct System::Impl { | |||
| 149 | const auto current_time = | 149 | const auto current_time = |
| 150 | std::chrono::duration_cast<std::chrono::seconds>(posix_time).count(); | 150 | std::chrono::duration_cast<std::chrono::seconds>(posix_time).count(); |
| 151 | Settings::values.custom_rtc_differential = | 151 | Settings::values.custom_rtc_differential = |
| 152 | Settings::values.custom_rtc.value_or(current_time) - current_time; | 152 | (Settings::values.custom_rtc_enabled ? Settings::values.custom_rtc.GetValue() |
| 153 | : current_time) - | ||
| 154 | current_time; | ||
| 153 | 155 | ||
| 154 | // Create a default fs if one doesn't already exist. | 156 | // Create a default fs if one doesn't already exist. |
| 155 | if (virtual_filesystem == nullptr) { | 157 | if (virtual_filesystem == nullptr) { |
diff --git a/src/core/hle/kernel/k_process.cpp b/src/core/hle/kernel/k_process.cpp index efe86ad27..ae064ee04 100644 --- a/src/core/hle/kernel/k_process.cpp +++ b/src/core/hle/kernel/k_process.cpp | |||
| @@ -81,7 +81,8 @@ Result KProcess::Initialize(KProcess* process, Core::System& system, std::string | |||
| 81 | process->m_capabilities.InitializeForMetadatalessProcess(); | 81 | process->m_capabilities.InitializeForMetadatalessProcess(); |
| 82 | process->m_is_initialized = true; | 82 | process->m_is_initialized = true; |
| 83 | 83 | ||
| 84 | std::mt19937 rng(Settings::values.rng_seed.GetValue().value_or(std::time(nullptr))); | 84 | std::mt19937 rng(Settings::values.rng_seed_enabled ? Settings::values.rng_seed.GetValue() |
| 85 | : static_cast<u32>(std::time(nullptr))); | ||
| 85 | std::uniform_int_distribution<u64> distribution; | 86 | std::uniform_int_distribution<u64> distribution; |
| 86 | std::generate(process->m_random_entropy.begin(), process->m_random_entropy.end(), | 87 | std::generate(process->m_random_entropy.begin(), process->m_random_entropy.end(), |
| 87 | [&] { return distribution(rng); }); | 88 | [&] { return distribution(rng); }); |
diff --git a/src/core/hle/service/spl/spl_module.cpp b/src/core/hle/service/spl/spl_module.cpp index 0227d4393..cd631b2ea 100644 --- a/src/core/hle/service/spl/spl_module.cpp +++ b/src/core/hle/service/spl/spl_module.cpp | |||
| @@ -19,7 +19,8 @@ namespace Service::SPL { | |||
| 19 | Module::Interface::Interface(Core::System& system_, std::shared_ptr<Module> module_, | 19 | Module::Interface::Interface(Core::System& system_, std::shared_ptr<Module> module_, |
| 20 | const char* name) | 20 | const char* name) |
| 21 | : ServiceFramework{system_, name}, module{std::move(module_)}, | 21 | : ServiceFramework{system_, name}, module{std::move(module_)}, |
| 22 | rng(Settings::values.rng_seed.GetValue().value_or(std::time(nullptr))) {} | 22 | rng(Settings::values.rng_seed_enabled ? Settings::values.rng_seed.GetValue() |
| 23 | : static_cast<u32>(std::time(nullptr))) {} | ||
| 23 | 24 | ||
| 24 | Module::Interface::~Interface() = default; | 25 | Module::Interface::~Interface() = default; |
| 25 | 26 | ||