diff options
Diffstat (limited to 'src/core')
| -rw-r--r-- | src/core/core.cpp | 10 | ||||
| -rw-r--r-- | src/core/hle/kernel/board/nintendo/nx/k_system_control.cpp | 20 |
2 files changed, 23 insertions, 7 deletions
diff --git a/src/core/core.cpp b/src/core/core.cpp index e2902a91f..951942083 100644 --- a/src/core/core.cpp +++ b/src/core/core.cpp | |||
| @@ -12,6 +12,7 @@ | |||
| 12 | #include "common/logging/log.h" | 12 | #include "common/logging/log.h" |
| 13 | #include "common/microprofile.h" | 13 | #include "common/microprofile.h" |
| 14 | #include "common/settings.h" | 14 | #include "common/settings.h" |
| 15 | #include "common/settings_enums.h" | ||
| 15 | #include "common/string_util.h" | 16 | #include "common/string_util.h" |
| 16 | #include "core/arm/exclusive_monitor.h" | 17 | #include "core/arm/exclusive_monitor.h" |
| 17 | #include "core/core.h" | 18 | #include "core/core.h" |
| @@ -140,7 +141,8 @@ struct System::Impl { | |||
| 140 | device_memory = std::make_unique<Core::DeviceMemory>(); | 141 | device_memory = std::make_unique<Core::DeviceMemory>(); |
| 141 | 142 | ||
| 142 | is_multicore = Settings::values.use_multi_core.GetValue(); | 143 | is_multicore = Settings::values.use_multi_core.GetValue(); |
| 143 | extended_memory_layout = Settings::values.use_unsafe_extended_memory_layout.GetValue(); | 144 | extended_memory_layout = |
| 145 | Settings::values.memory_layout_mode.GetValue() != Settings::MemoryLayout::Memory_4Gb; | ||
| 144 | 146 | ||
| 145 | core_timing.SetMulticore(is_multicore); | 147 | core_timing.SetMulticore(is_multicore); |
| 146 | core_timing.Initialize([&system]() { system.RegisterHostThread(); }); | 148 | core_timing.Initialize([&system]() { system.RegisterHostThread(); }); |
| @@ -168,7 +170,8 @@ struct System::Impl { | |||
| 168 | void ReinitializeIfNecessary(System& system) { | 170 | void ReinitializeIfNecessary(System& system) { |
| 169 | const bool must_reinitialize = | 171 | const bool must_reinitialize = |
| 170 | is_multicore != Settings::values.use_multi_core.GetValue() || | 172 | is_multicore != Settings::values.use_multi_core.GetValue() || |
| 171 | extended_memory_layout != Settings::values.use_unsafe_extended_memory_layout.GetValue(); | 173 | extended_memory_layout != (Settings::values.memory_layout_mode.GetValue() != |
| 174 | Settings::MemoryLayout::Memory_4Gb); | ||
| 172 | 175 | ||
| 173 | if (!must_reinitialize) { | 176 | if (!must_reinitialize) { |
| 174 | return; | 177 | return; |
| @@ -177,7 +180,8 @@ struct System::Impl { | |||
| 177 | LOG_DEBUG(Kernel, "Re-initializing"); | 180 | LOG_DEBUG(Kernel, "Re-initializing"); |
| 178 | 181 | ||
| 179 | is_multicore = Settings::values.use_multi_core.GetValue(); | 182 | is_multicore = Settings::values.use_multi_core.GetValue(); |
| 180 | extended_memory_layout = Settings::values.use_unsafe_extended_memory_layout.GetValue(); | 183 | extended_memory_layout = |
| 184 | Settings::values.memory_layout_mode.GetValue() != Settings::MemoryLayout::Memory_4Gb; | ||
| 181 | 185 | ||
| 182 | Initialize(system); | 186 | Initialize(system); |
| 183 | } | 187 | } |
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 { | |||
| 35 | using namespace Common::Literals; | 35 | using namespace Common::Literals; |
| 36 | 36 | ||
| 37 | u32 GetMemorySizeForInit() { | 37 | u32 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 | ||
| 42 | Smc::MemoryArrangement GetMemoryArrangeForInit() { | 48 | Smc::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 | ||