diff options
| author | 2023-07-17 19:59:22 -0400 | |
|---|---|---|
| committer | 2023-07-21 10:56:55 -0400 | |
| commit | 127b3da0f13ea0850c10115d45488dfe32a0a3f4 (patch) | |
| tree | 23d118473491a902f9f441da5c97fb4cd313cfcc /src/core/core.cpp | |
| parent | settings: Require time zone setting value for stirng (diff) | |
| download | yuzu-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/core.cpp')
| -rw-r--r-- | src/core/core.cpp | 10 |
1 files changed, 7 insertions, 3 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 | } |