summaryrefslogtreecommitdiffstats
path: root/src/core/hle/kernel
diff options
context:
space:
mode:
authorliamwhite <liamwhite@users.noreply.github.com>2023-08-02 20:25:52 +0200
committerGitHub <noreply@github.com>2023-08-02 20:25:52 +0200
commitfca7d975fdbeb1c63677b80efc03920affee4b12 (patch)
treebbded6cf80886c6def87bae92cf6784340165de9 /src/core/hle/kernel
parentMerge pull request #11204 from liamwhite/eds3-blend-amd (diff)
parentconfig(qt): Fix name of network category (diff)
downloadyuzu-fca7d975fdbeb1c63677b80efc03920affee4b12.tar
yuzu-fca7d975fdbeb1c63677b80efc03920affee4b12.tar.gz
yuzu-fca7d975fdbeb1c63677b80efc03920affee4b12.tar.bz2
yuzu-fca7d975fdbeb1c63677b80efc03920affee4b12.tar.lz
yuzu-fca7d975fdbeb1c63677b80efc03920affee4b12.tar.xz
yuzu-fca7d975fdbeb1c63677b80efc03920affee4b12.tar.zst
yuzu-fca7d975fdbeb1c63677b80efc03920affee4b12.zip
Diffstat (limited to 'src/core/hle/kernel')
-rw-r--r--src/core/hle/kernel/board/nintendo/nx/k_system_control.cpp22
-rw-r--r--src/core/hle/kernel/k_process.cpp3
2 files changed, 20 insertions, 5 deletions
diff --git a/src/core/hle/kernel/board/nintendo/nx/k_system_control.cpp b/src/core/hle/kernel/board/nintendo/nx/k_system_control.cpp
index 49bdc671e..4cfdf4558 100644
--- a/src/core/hle/kernel/board/nintendo/nx/k_system_control.cpp
+++ b/src/core/hle/kernel/board/nintendo/nx/k_system_control.cpp
@@ -35,13 +35,27 @@ namespace {
using namespace Common::Literals;
u32 GetMemorySizeForInit() {
- return Settings::values.use_unsafe_extended_memory_layout ? Smc::MemorySize_8GB
- : Smc::MemorySize_4GB;
+ switch (Settings::values.memory_layout_mode.GetValue()) {
+ case Settings::MemoryLayout::Memory_4Gb:
+ return Smc::MemorySize_4GB;
+ case Settings::MemoryLayout::Memory_6Gb:
+ return Smc::MemorySize_6GB;
+ case Settings::MemoryLayout::Memory_8Gb:
+ return Smc::MemorySize_8GB;
+ }
+ return Smc::MemorySize_4GB;
}
Smc::MemoryArrangement GetMemoryArrangeForInit() {
- return Settings::values.use_unsafe_extended_memory_layout ? Smc::MemoryArrangement_8GB
- : Smc::MemoryArrangement_4GB;
+ switch (Settings::values.memory_layout_mode.GetValue()) {
+ case Settings::MemoryLayout::Memory_4Gb:
+ return Smc::MemoryArrangement_4GB;
+ case Settings::MemoryLayout::Memory_6Gb:
+ return Smc::MemoryArrangement_6GB;
+ case Settings::MemoryLayout::Memory_8Gb:
+ return Smc::MemoryArrangement_8GB;
+ }
+ return Smc::MemoryArrangement_4GB;
}
} // namespace
diff --git a/src/core/hle/kernel/k_process.cpp b/src/core/hle/kernel/k_process.cpp
index 44c7cb22f..e573e2a57 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
process->m_capabilities.InitializeForMetadatalessProcess();
process->m_is_initialized = true;
- std::mt19937 rng(Settings::values.rng_seed.GetValue().value_or(std::time(nullptr)));
+ std::mt19937 rng(Settings::values.rng_seed_enabled ? Settings::values.rng_seed.GetValue()
+ : static_cast<u32>(std::time(nullptr)));
std::uniform_int_distribution<u64> distribution;
std::generate(process->m_random_entropy.begin(), process->m_random_entropy.end(),
[&] { return distribution(rng); });