diff options
Diffstat (limited to 'src/core')
| -rw-r--r-- | src/core/arm/dynarmic/arm_dynarmic_32.cpp | 6 | ||||
| -rw-r--r-- | src/core/arm/dynarmic/arm_dynarmic_64.cpp | 6 | ||||
| -rw-r--r-- | src/core/core.cpp | 28 | ||||
| -rw-r--r-- | src/core/file_sys/control_metadata.cpp | 3 | ||||
| -rw-r--r-- | src/core/file_sys/patch_manager.cpp | 4 | ||||
| -rw-r--r-- | src/core/hle/kernel/board/nintendo/nx/k_system_control.cpp | 22 | ||||
| -rw-r--r-- | src/core/hle/kernel/k_process.cpp | 3 | ||||
| -rw-r--r-- | src/core/hle/service/ns/ns.cpp | 2 | ||||
| -rw-r--r-- | src/core/hle/service/set/set.cpp | 10 | ||||
| -rw-r--r-- | src/core/hle/service/spl/spl_module.cpp | 3 | ||||
| -rw-r--r-- | src/core/hle/service/time/time_zone_content_manager.cpp | 3 | ||||
| -rw-r--r-- | src/core/telemetry_session.cpp | 34 |
12 files changed, 85 insertions, 39 deletions
diff --git a/src/core/arm/dynarmic/arm_dynarmic_32.cpp b/src/core/arm/dynarmic/arm_dynarmic_32.cpp index c97158a71..44a297cdc 100644 --- a/src/core/arm/dynarmic/arm_dynarmic_32.cpp +++ b/src/core/arm/dynarmic/arm_dynarmic_32.cpp | |||
| @@ -287,7 +287,7 @@ std::shared_ptr<Dynarmic::A32::Jit> ARM_Dynarmic_32::MakeJit(Common::PageTable* | |||
| 287 | } | 287 | } |
| 288 | } else { | 288 | } else { |
| 289 | // Unsafe optimizations | 289 | // Unsafe optimizations |
| 290 | if (Settings::values.cpu_accuracy.GetValue() == Settings::CPUAccuracy::Unsafe) { | 290 | if (Settings::values.cpu_accuracy.GetValue() == Settings::CpuAccuracy::Unsafe) { |
| 291 | config.unsafe_optimizations = true; | 291 | config.unsafe_optimizations = true; |
| 292 | if (Settings::values.cpuopt_unsafe_unfuse_fma) { | 292 | if (Settings::values.cpuopt_unsafe_unfuse_fma) { |
| 293 | config.optimizations |= Dynarmic::OptimizationFlag::Unsafe_UnfuseFMA; | 293 | config.optimizations |= Dynarmic::OptimizationFlag::Unsafe_UnfuseFMA; |
| @@ -307,7 +307,7 @@ std::shared_ptr<Dynarmic::A32::Jit> ARM_Dynarmic_32::MakeJit(Common::PageTable* | |||
| 307 | } | 307 | } |
| 308 | 308 | ||
| 309 | // Curated optimizations | 309 | // Curated optimizations |
| 310 | if (Settings::values.cpu_accuracy.GetValue() == Settings::CPUAccuracy::Auto) { | 310 | if (Settings::values.cpu_accuracy.GetValue() == Settings::CpuAccuracy::Auto) { |
| 311 | config.unsafe_optimizations = true; | 311 | config.unsafe_optimizations = true; |
| 312 | config.optimizations |= Dynarmic::OptimizationFlag::Unsafe_UnfuseFMA; | 312 | config.optimizations |= Dynarmic::OptimizationFlag::Unsafe_UnfuseFMA; |
| 313 | config.optimizations |= Dynarmic::OptimizationFlag::Unsafe_IgnoreStandardFPCRValue; | 313 | config.optimizations |= Dynarmic::OptimizationFlag::Unsafe_IgnoreStandardFPCRValue; |
| @@ -316,7 +316,7 @@ std::shared_ptr<Dynarmic::A32::Jit> ARM_Dynarmic_32::MakeJit(Common::PageTable* | |||
| 316 | } | 316 | } |
| 317 | 317 | ||
| 318 | // Paranoia mode for debugging optimizations | 318 | // Paranoia mode for debugging optimizations |
| 319 | if (Settings::values.cpu_accuracy.GetValue() == Settings::CPUAccuracy::Paranoid) { | 319 | if (Settings::values.cpu_accuracy.GetValue() == Settings::CpuAccuracy::Paranoid) { |
| 320 | config.unsafe_optimizations = false; | 320 | config.unsafe_optimizations = false; |
| 321 | config.optimizations = Dynarmic::no_optimizations; | 321 | config.optimizations = Dynarmic::no_optimizations; |
| 322 | } | 322 | } |
diff --git a/src/core/arm/dynarmic/arm_dynarmic_64.cpp b/src/core/arm/dynarmic/arm_dynarmic_64.cpp index 791d466ca..2e3674b6d 100644 --- a/src/core/arm/dynarmic/arm_dynarmic_64.cpp +++ b/src/core/arm/dynarmic/arm_dynarmic_64.cpp | |||
| @@ -347,7 +347,7 @@ std::shared_ptr<Dynarmic::A64::Jit> ARM_Dynarmic_64::MakeJit(Common::PageTable* | |||
| 347 | } | 347 | } |
| 348 | } else { | 348 | } else { |
| 349 | // Unsafe optimizations | 349 | // Unsafe optimizations |
| 350 | if (Settings::values.cpu_accuracy.GetValue() == Settings::CPUAccuracy::Unsafe) { | 350 | if (Settings::values.cpu_accuracy.GetValue() == Settings::CpuAccuracy::Unsafe) { |
| 351 | config.unsafe_optimizations = true; | 351 | config.unsafe_optimizations = true; |
| 352 | if (Settings::values.cpuopt_unsafe_unfuse_fma) { | 352 | if (Settings::values.cpuopt_unsafe_unfuse_fma) { |
| 353 | config.optimizations |= Dynarmic::OptimizationFlag::Unsafe_UnfuseFMA; | 353 | config.optimizations |= Dynarmic::OptimizationFlag::Unsafe_UnfuseFMA; |
| @@ -367,7 +367,7 @@ std::shared_ptr<Dynarmic::A64::Jit> ARM_Dynarmic_64::MakeJit(Common::PageTable* | |||
| 367 | } | 367 | } |
| 368 | 368 | ||
| 369 | // Curated optimizations | 369 | // Curated optimizations |
| 370 | if (Settings::values.cpu_accuracy.GetValue() == Settings::CPUAccuracy::Auto) { | 370 | if (Settings::values.cpu_accuracy.GetValue() == Settings::CpuAccuracy::Auto) { |
| 371 | config.unsafe_optimizations = true; | 371 | config.unsafe_optimizations = true; |
| 372 | config.optimizations |= Dynarmic::OptimizationFlag::Unsafe_UnfuseFMA; | 372 | config.optimizations |= Dynarmic::OptimizationFlag::Unsafe_UnfuseFMA; |
| 373 | config.fastmem_address_space_bits = 64; | 373 | config.fastmem_address_space_bits = 64; |
| @@ -375,7 +375,7 @@ std::shared_ptr<Dynarmic::A64::Jit> ARM_Dynarmic_64::MakeJit(Common::PageTable* | |||
| 375 | } | 375 | } |
| 376 | 376 | ||
| 377 | // Paranoia mode for debugging optimizations | 377 | // Paranoia mode for debugging optimizations |
| 378 | if (Settings::values.cpu_accuracy.GetValue() == Settings::CPUAccuracy::Paranoid) { | 378 | if (Settings::values.cpu_accuracy.GetValue() == Settings::CpuAccuracy::Paranoid) { |
| 379 | config.unsafe_optimizations = false; | 379 | config.unsafe_optimizations = false; |
| 380 | config.optimizations = Dynarmic::no_optimizations; | 380 | config.optimizations = Dynarmic::no_optimizations; |
| 381 | } | 381 | } |
diff --git a/src/core/core.cpp b/src/core/core.cpp index 48233d7c8..2f67e60a9 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,16 +141,13 @@ 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(); }); |
| 147 | 149 | ||
| 148 | const auto posix_time = std::chrono::system_clock::now().time_since_epoch(); | 150 | RefreshTime(); |
| 149 | const auto current_time = | ||
| 150 | std::chrono::duration_cast<std::chrono::seconds>(posix_time).count(); | ||
| 151 | Settings::values.custom_rtc_differential = | ||
| 152 | Settings::values.custom_rtc.value_or(current_time) - current_time; | ||
| 153 | 151 | ||
| 154 | // Create a default fs if one doesn't already exist. | 152 | // Create a default fs if one doesn't already exist. |
| 155 | if (virtual_filesystem == nullptr) { | 153 | if (virtual_filesystem == nullptr) { |
| @@ -172,7 +170,8 @@ struct System::Impl { | |||
| 172 | void ReinitializeIfNecessary(System& system) { | 170 | void ReinitializeIfNecessary(System& system) { |
| 173 | const bool must_reinitialize = | 171 | const bool must_reinitialize = |
| 174 | is_multicore != Settings::values.use_multi_core.GetValue() || | 172 | is_multicore != Settings::values.use_multi_core.GetValue() || |
| 175 | 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); | ||
| 176 | 175 | ||
| 177 | if (!must_reinitialize) { | 176 | if (!must_reinitialize) { |
| 178 | return; | 177 | return; |
| @@ -181,11 +180,22 @@ struct System::Impl { | |||
| 181 | LOG_DEBUG(Kernel, "Re-initializing"); | 180 | LOG_DEBUG(Kernel, "Re-initializing"); |
| 182 | 181 | ||
| 183 | is_multicore = Settings::values.use_multi_core.GetValue(); | 182 | is_multicore = Settings::values.use_multi_core.GetValue(); |
| 184 | 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; | ||
| 185 | 185 | ||
| 186 | Initialize(system); | 186 | Initialize(system); |
| 187 | } | 187 | } |
| 188 | 188 | ||
| 189 | void RefreshTime() { | ||
| 190 | const auto posix_time = std::chrono::system_clock::now().time_since_epoch(); | ||
| 191 | const auto current_time = | ||
| 192 | std::chrono::duration_cast<std::chrono::seconds>(posix_time).count(); | ||
| 193 | Settings::values.custom_rtc_differential = | ||
| 194 | (Settings::values.custom_rtc_enabled ? Settings::values.custom_rtc.GetValue() | ||
| 195 | : current_time) - | ||
| 196 | current_time; | ||
| 197 | } | ||
| 198 | |||
| 189 | void Run() { | 199 | void Run() { |
| 190 | std::unique_lock<std::mutex> lk(suspend_guard); | 200 | std::unique_lock<std::mutex> lk(suspend_guard); |
| 191 | 201 | ||
| @@ -1028,6 +1038,8 @@ void System::Exit() { | |||
| 1028 | } | 1038 | } |
| 1029 | 1039 | ||
| 1030 | void System::ApplySettings() { | 1040 | void System::ApplySettings() { |
| 1041 | impl->RefreshTime(); | ||
| 1042 | |||
| 1031 | if (IsPoweredOn()) { | 1043 | if (IsPoweredOn()) { |
| 1032 | Renderer().RefreshBaseSettings(); | 1044 | Renderer().RefreshBaseSettings(); |
| 1033 | } | 1045 | } |
diff --git a/src/core/file_sys/control_metadata.cpp b/src/core/file_sys/control_metadata.cpp index cd9ac2e75..0697c29ae 100644 --- a/src/core/file_sys/control_metadata.cpp +++ b/src/core/file_sys/control_metadata.cpp | |||
| @@ -68,7 +68,8 @@ NACP::NACP(VirtualFile file) { | |||
| 68 | NACP::~NACP() = default; | 68 | NACP::~NACP() = default; |
| 69 | 69 | ||
| 70 | const LanguageEntry& NACP::GetLanguageEntry() const { | 70 | const LanguageEntry& NACP::GetLanguageEntry() const { |
| 71 | Language language = language_to_codes[Settings::values.language_index.GetValue()]; | 71 | Language language = |
| 72 | language_to_codes[static_cast<s32>(Settings::values.language_index.GetValue())]; | ||
| 72 | 73 | ||
| 73 | { | 74 | { |
| 74 | const auto& language_entry = raw.language_entries.at(static_cast<u8>(language)); | 75 | const auto& language_entry = raw.language_entries.at(static_cast<u8>(language)); |
diff --git a/src/core/file_sys/patch_manager.cpp b/src/core/file_sys/patch_manager.cpp index d3286b352..2ba1b34a4 100644 --- a/src/core/file_sys/patch_manager.cpp +++ b/src/core/file_sys/patch_manager.cpp | |||
| @@ -626,8 +626,8 @@ PatchManager::Metadata PatchManager::ParseControlNCA(const NCA& nca) const { | |||
| 626 | auto nacp = nacp_file == nullptr ? nullptr : std::make_unique<NACP>(nacp_file); | 626 | auto nacp = nacp_file == nullptr ? nullptr : std::make_unique<NACP>(nacp_file); |
| 627 | 627 | ||
| 628 | // Get language code from settings | 628 | // Get language code from settings |
| 629 | const auto language_code = | 629 | const auto language_code = Service::Set::GetLanguageCodeFromIndex( |
| 630 | Service::Set::GetLanguageCodeFromIndex(Settings::values.language_index.GetValue()); | 630 | static_cast<u32>(Settings::values.language_index.GetValue())); |
| 631 | 631 | ||
| 632 | // Convert to application language and get priority list | 632 | // Convert to application language and get priority list |
| 633 | const auto application_language = | 633 | const auto application_language = |
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 { | |||
| 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 | } | ||
| 46 | return Smc::MemorySize_4GB; | ||
| 40 | } | 47 | } |
| 41 | 48 | ||
| 42 | Smc::MemoryArrangement GetMemoryArrangeForInit() { | 49 | Smc::MemoryArrangement GetMemoryArrangeForInit() { |
| 43 | return Settings::values.use_unsafe_extended_memory_layout ? Smc::MemoryArrangement_8GB | 50 | switch (Settings::values.memory_layout_mode.GetValue()) { |
| 44 | : Smc::MemoryArrangement_4GB; | 51 | case Settings::MemoryLayout::Memory_4Gb: |
| 52 | return Smc::MemoryArrangement_4GB; | ||
| 53 | case Settings::MemoryLayout::Memory_6Gb: | ||
| 54 | return Smc::MemoryArrangement_6GB; | ||
| 55 | case Settings::MemoryLayout::Memory_8Gb: | ||
| 56 | return Smc::MemoryArrangement_8GB; | ||
| 57 | } | ||
| 58 | return Smc::MemoryArrangement_4GB; | ||
| 45 | } | 59 | } |
| 46 | } // namespace | 60 | } // namespace |
| 47 | 61 | ||
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 | |||
| 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/ns/ns.cpp b/src/core/hle/service/ns/ns.cpp index 376067a95..91c5a2182 100644 --- a/src/core/hle/service/ns/ns.cpp +++ b/src/core/hle/service/ns/ns.cpp | |||
| @@ -409,7 +409,7 @@ ResultVal<u8> IApplicationManagerInterface::GetApplicationDesiredLanguage( | |||
| 409 | 409 | ||
| 410 | // Get language code from settings | 410 | // Get language code from settings |
| 411 | const auto language_code = | 411 | const auto language_code = |
| 412 | Set::GetLanguageCodeFromIndex(Settings::values.language_index.GetValue()); | 412 | Set::GetLanguageCodeFromIndex(static_cast<s32>(Settings::values.language_index.GetValue())); |
| 413 | 413 | ||
| 414 | // Convert to application language, get priority list | 414 | // Convert to application language, get priority list |
| 415 | const auto application_language = ConvertToApplicationLanguage(language_code); | 415 | const auto application_language = ConvertToApplicationLanguage(language_code); |
diff --git a/src/core/hle/service/set/set.cpp b/src/core/hle/service/set/set.cpp index f5788b481..83f888c54 100644 --- a/src/core/hle/service/set/set.cpp +++ b/src/core/hle/service/set/set.cpp | |||
| @@ -93,7 +93,8 @@ void GetAvailableLanguageCodesImpl(HLERequestContext& ctx, std::size_t max_entri | |||
| 93 | } | 93 | } |
| 94 | 94 | ||
| 95 | void GetKeyCodeMapImpl(HLERequestContext& ctx) { | 95 | void GetKeyCodeMapImpl(HLERequestContext& ctx) { |
| 96 | const auto language_code = available_language_codes[Settings::values.language_index.GetValue()]; | 96 | const auto language_code = |
| 97 | available_language_codes[static_cast<s32>(Settings::values.language_index.GetValue())]; | ||
| 97 | const auto key_code = | 98 | const auto key_code = |
| 98 | std::find_if(language_to_layout.cbegin(), language_to_layout.cend(), | 99 | std::find_if(language_to_layout.cbegin(), language_to_layout.cend(), |
| 99 | [=](const auto& element) { return element.first == language_code; }); | 100 | [=](const auto& element) { return element.first == language_code; }); |
| @@ -162,7 +163,7 @@ void SET::GetQuestFlag(HLERequestContext& ctx) { | |||
| 162 | 163 | ||
| 163 | IPC::ResponseBuilder rb{ctx, 3}; | 164 | IPC::ResponseBuilder rb{ctx, 3}; |
| 164 | rb.Push(ResultSuccess); | 165 | rb.Push(ResultSuccess); |
| 165 | rb.Push(static_cast<u32>(Settings::values.quest_flag.GetValue())); | 166 | rb.Push(static_cast<s32>(Settings::values.quest_flag.GetValue())); |
| 166 | } | 167 | } |
| 167 | 168 | ||
| 168 | void SET::GetLanguageCode(HLERequestContext& ctx) { | 169 | void SET::GetLanguageCode(HLERequestContext& ctx) { |
| @@ -170,7 +171,8 @@ void SET::GetLanguageCode(HLERequestContext& ctx) { | |||
| 170 | 171 | ||
| 171 | IPC::ResponseBuilder rb{ctx, 4}; | 172 | IPC::ResponseBuilder rb{ctx, 4}; |
| 172 | rb.Push(ResultSuccess); | 173 | rb.Push(ResultSuccess); |
| 173 | rb.PushEnum(available_language_codes[Settings::values.language_index.GetValue()]); | 174 | rb.PushEnum( |
| 175 | available_language_codes[static_cast<s32>(Settings::values.language_index.GetValue())]); | ||
| 174 | } | 176 | } |
| 175 | 177 | ||
| 176 | void SET::GetRegionCode(HLERequestContext& ctx) { | 178 | void SET::GetRegionCode(HLERequestContext& ctx) { |
| @@ -178,7 +180,7 @@ void SET::GetRegionCode(HLERequestContext& ctx) { | |||
| 178 | 180 | ||
| 179 | IPC::ResponseBuilder rb{ctx, 3}; | 181 | IPC::ResponseBuilder rb{ctx, 3}; |
| 180 | rb.Push(ResultSuccess); | 182 | rb.Push(ResultSuccess); |
| 181 | rb.Push(Settings::values.region_index.GetValue()); | 183 | rb.Push(static_cast<u32>(Settings::values.region_index.GetValue())); |
| 182 | } | 184 | } |
| 183 | 185 | ||
| 184 | void SET::GetKeyCodeMap(HLERequestContext& ctx) { | 186 | void SET::GetKeyCodeMap(HLERequestContext& ctx) { |
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 | ||
diff --git a/src/core/hle/service/time/time_zone_content_manager.cpp b/src/core/hle/service/time/time_zone_content_manager.cpp index 3b6047ad0..1b96de37a 100644 --- a/src/core/hle/service/time/time_zone_content_manager.cpp +++ b/src/core/hle/service/time/time_zone_content_manager.cpp | |||
| @@ -78,7 +78,8 @@ TimeZoneContentManager::TimeZoneContentManager(Core::System& system_) | |||
| 78 | location_name_cache{BuildLocationNameCache(time_zone_binary)} {} | 78 | location_name_cache{BuildLocationNameCache(time_zone_binary)} {} |
| 79 | 79 | ||
| 80 | void TimeZoneContentManager::Initialize(TimeManager& time_manager) { | 80 | void TimeZoneContentManager::Initialize(TimeManager& time_manager) { |
| 81 | const auto timezone_setting = Settings::GetTimeZoneString(); | 81 | const auto timezone_setting = |
| 82 | Settings::GetTimeZoneString(Settings::values.time_zone_index.GetValue()); | ||
| 82 | 83 | ||
| 83 | if (FileSys::VirtualFile vfs_file; | 84 | if (FileSys::VirtualFile vfs_file; |
| 84 | GetTimeZoneInfoFile(timezone_setting, vfs_file) == ResultSuccess) { | 85 | GetTimeZoneInfoFile(timezone_setting, vfs_file) == ResultSuccess) { |
diff --git a/src/core/telemetry_session.cpp b/src/core/telemetry_session.cpp index 7a2f3c90a..62b3f6636 100644 --- a/src/core/telemetry_session.cpp +++ b/src/core/telemetry_session.cpp | |||
| @@ -61,13 +61,13 @@ static const char* TranslateRenderer(Settings::RendererBackend backend) { | |||
| 61 | return "Unknown"; | 61 | return "Unknown"; |
| 62 | } | 62 | } |
| 63 | 63 | ||
| 64 | static const char* TranslateGPUAccuracyLevel(Settings::GPUAccuracy backend) { | 64 | static const char* TranslateGPUAccuracyLevel(Settings::GpuAccuracy backend) { |
| 65 | switch (backend) { | 65 | switch (backend) { |
| 66 | case Settings::GPUAccuracy::Normal: | 66 | case Settings::GpuAccuracy::Normal: |
| 67 | return "Normal"; | 67 | return "Normal"; |
| 68 | case Settings::GPUAccuracy::High: | 68 | case Settings::GpuAccuracy::High: |
| 69 | return "High"; | 69 | return "High"; |
| 70 | case Settings::GPUAccuracy::Extreme: | 70 | case Settings::GpuAccuracy::Extreme: |
| 71 | return "Extreme"; | 71 | return "Extreme"; |
| 72 | } | 72 | } |
| 73 | return "Unknown"; | 73 | return "Unknown"; |
| @@ -77,9 +77,9 @@ static const char* TranslateNvdecEmulation(Settings::NvdecEmulation backend) { | |||
| 77 | switch (backend) { | 77 | switch (backend) { |
| 78 | case Settings::NvdecEmulation::Off: | 78 | case Settings::NvdecEmulation::Off: |
| 79 | return "Off"; | 79 | return "Off"; |
| 80 | case Settings::NvdecEmulation::CPU: | 80 | case Settings::NvdecEmulation::Cpu: |
| 81 | return "CPU"; | 81 | return "CPU"; |
| 82 | case Settings::NvdecEmulation::GPU: | 82 | case Settings::NvdecEmulation::Gpu: |
| 83 | return "GPU"; | 83 | return "GPU"; |
| 84 | } | 84 | } |
| 85 | return "Unknown"; | 85 | return "Unknown"; |
| @@ -91,14 +91,26 @@ static constexpr const char* TranslateVSyncMode(Settings::VSyncMode mode) { | |||
| 91 | return "Immediate"; | 91 | return "Immediate"; |
| 92 | case Settings::VSyncMode::Mailbox: | 92 | case Settings::VSyncMode::Mailbox: |
| 93 | return "Mailbox"; | 93 | return "Mailbox"; |
| 94 | case Settings::VSyncMode::FIFO: | 94 | case Settings::VSyncMode::Fifo: |
| 95 | return "FIFO"; | 95 | return "FIFO"; |
| 96 | case Settings::VSyncMode::FIFORelaxed: | 96 | case Settings::VSyncMode::FifoRelaxed: |
| 97 | return "FIFO Relaxed"; | 97 | return "FIFO Relaxed"; |
| 98 | } | 98 | } |
| 99 | return "Unknown"; | 99 | return "Unknown"; |
| 100 | } | 100 | } |
| 101 | 101 | ||
| 102 | static constexpr const char* TranslateASTCDecodeMode(Settings::AstcDecodeMode mode) { | ||
| 103 | switch (mode) { | ||
| 104 | case Settings::AstcDecodeMode::Cpu: | ||
| 105 | return "CPU"; | ||
| 106 | case Settings::AstcDecodeMode::Gpu: | ||
| 107 | return "GPU"; | ||
| 108 | case Settings::AstcDecodeMode::CpuAsynchronous: | ||
| 109 | return "CPU Asynchronous"; | ||
| 110 | } | ||
| 111 | return "Unknown"; | ||
| 112 | } | ||
| 113 | |||
| 102 | u64 GetTelemetryId() { | 114 | u64 GetTelemetryId() { |
| 103 | u64 telemetry_id{}; | 115 | u64 telemetry_id{}; |
| 104 | const auto filename = Common::FS::GetYuzuPath(Common::FS::YuzuPath::ConfigDir) / "telemetry_id"; | 116 | const auto filename = Common::FS::GetYuzuPath(Common::FS::YuzuPath::ConfigDir) / "telemetry_id"; |
| @@ -240,7 +252,8 @@ void TelemetrySession::AddInitialInfo(Loader::AppLoader& app_loader, | |||
| 240 | 252 | ||
| 241 | // Log user configuration information | 253 | // Log user configuration information |
| 242 | constexpr auto field_type = Telemetry::FieldType::UserConfig; | 254 | constexpr auto field_type = Telemetry::FieldType::UserConfig; |
| 243 | AddField(field_type, "Audio_SinkId", Settings::values.sink_id.GetValue()); | 255 | AddField(field_type, "Audio_SinkId", |
| 256 | Settings::CanonicalizeEnum(Settings::values.sink_id.GetValue())); | ||
| 244 | AddField(field_type, "Core_UseMultiCore", Settings::values.use_multi_core.GetValue()); | 257 | AddField(field_type, "Core_UseMultiCore", Settings::values.use_multi_core.GetValue()); |
| 245 | AddField(field_type, "Renderer_Backend", | 258 | AddField(field_type, "Renderer_Backend", |
| 246 | TranslateRenderer(Settings::values.renderer_backend.GetValue())); | 259 | TranslateRenderer(Settings::values.renderer_backend.GetValue())); |
| @@ -254,7 +267,8 @@ void TelemetrySession::AddInitialInfo(Loader::AppLoader& app_loader, | |||
| 254 | Settings::values.use_asynchronous_gpu_emulation.GetValue()); | 267 | Settings::values.use_asynchronous_gpu_emulation.GetValue()); |
| 255 | AddField(field_type, "Renderer_NvdecEmulation", | 268 | AddField(field_type, "Renderer_NvdecEmulation", |
| 256 | TranslateNvdecEmulation(Settings::values.nvdec_emulation.GetValue())); | 269 | TranslateNvdecEmulation(Settings::values.nvdec_emulation.GetValue())); |
| 257 | AddField(field_type, "Renderer_AccelerateASTC", Settings::values.accelerate_astc.GetValue()); | 270 | AddField(field_type, "Renderer_AccelerateASTC", |
| 271 | TranslateASTCDecodeMode(Settings::values.accelerate_astc.GetValue())); | ||
| 258 | AddField(field_type, "Renderer_UseVsync", | 272 | AddField(field_type, "Renderer_UseVsync", |
| 259 | TranslateVSyncMode(Settings::values.vsync_mode.GetValue())); | 273 | TranslateVSyncMode(Settings::values.vsync_mode.GetValue())); |
| 260 | AddField(field_type, "Renderer_ShaderBackend", | 274 | AddField(field_type, "Renderer_ShaderBackend", |