summaryrefslogtreecommitdiff
path: root/src/core/hle/kernel/board
diff options
context:
space:
mode:
authorGravatar lat9nq2023-07-17 19:59:22 -0400
committerGravatar lat9nq2023-07-21 10:56:55 -0400
commit127b3da0f13ea0850c10115d45488dfe32a0a3f4 (patch)
tree23d118473491a902f9f441da5c97fb4cd313cfcc /src/core/hle/kernel/board
parentsettings: Require time zone setting value for stirng (diff)
downloadyuzu-127b3da0f13ea0850c10115d45488dfe32a0a3f4.tar.gz
yuzu-127b3da0f13ea0850c10115d45488dfe32a0a3f4.tar.xz
yuzu-127b3da0f13ea0850c10115d45488dfe32a0a3f4.zip
core,common: Give memory layout setting an enum
Allows for 6GB and 8GB layouts to be selected.
Diffstat (limited to 'src/core/hle/kernel/board')
-rw-r--r--src/core/hle/kernel/board/nintendo/nx/k_system_control.cpp20
1 files changed, 16 insertions, 4 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..7320b87b9 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,25 @@ namespace {
35using namespace Common::Literals; 35using namespace Common::Literals;
36 36
37u32 GetMemorySizeForInit() { 37u32 GetMemorySizeForInit() {
38 return Settings::values.use_unsafe_extended_memory_layout ? Smc::MemorySize_8GB 38 switch (Settings::values.memory_layout_mode.GetValue()) {
39 : Smc::MemorySize_4GB; 39 case Settings::MemoryLayout::Memory_4Gb:
40 return Smc::MemorySize_4GB;
41 case Settings::MemoryLayout::Memory_6Gb:
42 return Smc::MemorySize_6GB;
43 case Settings::MemoryLayout::Memory_8Gb:
44 return Smc::MemorySize_8GB;
45 }
40} 46}
41 47
42Smc::MemoryArrangement GetMemoryArrangeForInit() { 48Smc::MemoryArrangement GetMemoryArrangeForInit() {
43 return Settings::values.use_unsafe_extended_memory_layout ? Smc::MemoryArrangement_8GB 49 switch (Settings::values.memory_layout_mode.GetValue()) {
44 : Smc::MemoryArrangement_4GB; 50 case Settings::MemoryLayout::Memory_4Gb:
51 return Smc::MemoryArrangement_4GB;
52 case Settings::MemoryLayout::Memory_6Gb:
53 return Smc::MemoryArrangement_6GB;
54 case Settings::MemoryLayout::Memory_8Gb:
55 return Smc::MemoryArrangement_8GB;
56 }
45} 57}
46} // namespace 58} // namespace
47 59