From a9862b539547a3770d2abea897ce7c8d886d17c9 Mon Sep 17 00:00:00 2001 From: JosJuice Date: Sat, 6 Mar 2021 18:58:19 +0100 Subject: [PATCH 1/5] NetPlay: Sync more settings --- .../Core/ConfigLoaders/NetPlayConfigLoader.cpp | 18 ++++++++++++++++-- Source/Core/Core/NetPlayClient.cpp | 14 ++++++++++++-- Source/Core/Core/NetPlayProto.h | 15 +++++++++++++-- Source/Core/Core/NetPlayServer.cpp | 8 ++++++-- .../Core/DolphinQt/NetPlay/NetPlayDialog.cpp | 16 ++++++++++++++-- 5 files changed, 61 insertions(+), 10 deletions(-) diff --git a/Source/Core/Core/ConfigLoaders/NetPlayConfigLoader.cpp b/Source/Core/Core/ConfigLoaders/NetPlayConfigLoader.cpp index 2cc63eb146..76a88b9c76 100644 --- a/Source/Core/Core/ConfigLoaders/NetPlayConfigLoader.cpp +++ b/Source/Core/Core/ConfigLoaders/NetPlayConfigLoader.cpp @@ -39,9 +39,21 @@ public: layer->Set(Config::MAIN_SLOT_B, static_cast(m_settings.m_EXIDevice[1])); layer->Set(Config::MAIN_SERIAL_PORT_1, static_cast(m_settings.m_EXIDevice[2])); layer->Set(Config::MAIN_WII_SD_CARD_WRITABLE, m_settings.m_WriteToMemcard); + layer->Set(Config::MAIN_MEM1_SIZE, m_settings.m_Mem1Size); + layer->Set(Config::MAIN_MEM2_SIZE, m_settings.m_Mem2Size); + layer->Set(Config::MAIN_FALLBACK_REGION, m_settings.m_FallbackRegion); layer->Set(Config::MAIN_DSP_JIT, m_settings.m_DSPEnableJIT); - layer->Set(Config::SYSCONF_PROGRESSIVE_SCAN, m_settings.m_ProgressiveScan); - layer->Set(Config::SYSCONF_PAL60, m_settings.m_PAL60); + + for (size_t i = 0; i < Config::SYSCONF_SETTINGS.size(); ++i) + { + std::visit( + [&](auto* info) { + layer->Set(*info, static_castGetDefaultValue())>( + m_settings.m_SYSCONFSettings[i])); + }, + Config::SYSCONF_SETTINGS[i].config_info); + } + layer->Set(Config::GFX_HACK_EFB_ACCESS_ENABLE, m_settings.m_EFBAccessEnable); layer->Set(Config::GFX_HACK_BBOX_ENABLE, m_settings.m_BBoxEnable); layer->Set(Config::GFX_HACK_FORCE_PROGRESSIVE, m_settings.m_ForceProgressive); @@ -60,12 +72,14 @@ public: layer->Set(Config::MAIN_SYNC_GPU_MAX_DISTANCE, m_settings.m_SyncGpuMaxDistance); layer->Set(Config::MAIN_SYNC_GPU_MIN_DISTANCE, m_settings.m_SyncGpuMinDistance); layer->Set(Config::MAIN_SYNC_GPU_OVERCLOCK, m_settings.m_SyncGpuOverclock); + layer->Set(Config::MAIN_JIT_FOLLOW_BRANCH, m_settings.m_JITFollowBranch); layer->Set(Config::MAIN_FAST_DISC_SPEED, m_settings.m_FastDiscSpeed); layer->Set(Config::MAIN_MMU, m_settings.m_MMU); layer->Set(Config::MAIN_FASTMEM, m_settings.m_Fastmem); layer->Set(Config::MAIN_SKIP_IPL, m_settings.m_SkipIPL); layer->Set(Config::MAIN_LOAD_IPL_DUMP, m_settings.m_LoadIPLDump); + layer->Set(Config::GFX_HACK_DEFER_EFB_COPIES, m_settings.m_DeferEFBCopies); layer->Set(Config::GFX_HACK_EFB_ACCESS_TILE_SIZE, m_settings.m_EFBAccessTileSize); layer->Set(Config::GFX_HACK_EFB_DEFER_INVALIDATION, m_settings.m_EFBAccessDeferInvalidation); diff --git a/Source/Core/Core/NetPlayClient.cpp b/Source/Core/Core/NetPlayClient.cpp index 3a16332b89..ea8a3a66df 100644 --- a/Source/Core/Core/NetPlayClient.cpp +++ b/Source/Core/Core/NetPlayClient.cpp @@ -654,11 +654,18 @@ unsigned int NetPlayClient::OnData(sf::Packet& packet) packet >> m_net_settings.m_EnableCheats; packet >> m_net_settings.m_SelectedLanguage; packet >> m_net_settings.m_OverrideRegionSettings; - packet >> m_net_settings.m_ProgressiveScan; - packet >> m_net_settings.m_PAL60; packet >> m_net_settings.m_DSPEnableJIT; packet >> m_net_settings.m_DSPHLE; packet >> m_net_settings.m_WriteToMemcard; + packet >> m_net_settings.m_Mem1Size; + packet >> m_net_settings.m_Mem2Size; + + { + std::underlying_type_t tmp; + packet >> tmp; + m_net_settings.m_FallbackRegion = static_cast(tmp); + } + packet >> m_net_settings.m_CopyWiiSave; packet >> m_net_settings.m_OCEnable; packet >> m_net_settings.m_OCFactor; @@ -670,6 +677,9 @@ unsigned int NetPlayClient::OnData(sf::Packet& packet) device = static_cast(tmp); } + for (u32& value : m_net_settings.m_SYSCONFSettings) + packet >> value; + packet >> m_net_settings.m_EFBAccessEnable; packet >> m_net_settings.m_BBoxEnable; packet >> m_net_settings.m_ForceProgressive; diff --git a/Source/Core/Core/NetPlayProto.h b/Source/Core/Core/NetPlayProto.h index 092344fcc7..e22d0eab6e 100644 --- a/Source/Core/Core/NetPlayProto.h +++ b/Source/Core/Core/NetPlayProto.h @@ -6,9 +6,15 @@ #include #include + #include "Common/CommonTypes.h" +#include "Core/Config/SYSCONFSettings.h" #include "Core/HW/EXI/EXI_Device.h" +namespace DiscIO +{ +enum class Region; +} namespace IOS::HLE::FS { class FileSystem; @@ -27,15 +33,19 @@ struct NetSettings bool m_EnableCheats; int m_SelectedLanguage; bool m_OverrideRegionSettings; - bool m_ProgressiveScan; - bool m_PAL60; bool m_DSPHLE; bool m_DSPEnableJIT; bool m_WriteToMemcard; + u32 m_Mem1Size; + u32 m_Mem2Size; + DiscIO::Region m_FallbackRegion; bool m_CopyWiiSave; bool m_OCEnable; float m_OCFactor; std::array m_EXIDevice; + + std::array m_SYSCONFSettings; + bool m_EFBAccessEnable; bool m_BBoxEnable; bool m_ForceProgressive; @@ -76,6 +86,7 @@ struct NetSettings bool m_DeferEFBCopies; bool m_EFBAccessTileSize; bool m_EFBAccessDeferInvalidation; + bool m_StrictSettingsSync; bool m_SyncSaveData; bool m_SyncCodes; diff --git a/Source/Core/Core/NetPlayServer.cpp b/Source/Core/Core/NetPlayServer.cpp index 0fa0088c9a..5afb62b86f 100644 --- a/Source/Core/Core/NetPlayServer.cpp +++ b/Source/Core/Core/NetPlayServer.cpp @@ -1303,11 +1303,12 @@ bool NetPlayServer::StartGame() spac << m_settings.m_EnableCheats; spac << m_settings.m_SelectedLanguage; spac << m_settings.m_OverrideRegionSettings; - spac << m_settings.m_ProgressiveScan; - spac << m_settings.m_PAL60; spac << m_settings.m_DSPEnableJIT; spac << m_settings.m_DSPHLE; spac << m_settings.m_WriteToMemcard; + spac << m_settings.m_Mem1Size; + spac << m_settings.m_Mem2Size; + spac << static_cast>(m_settings.m_FallbackRegion); spac << m_settings.m_CopyWiiSave; spac << m_settings.m_OCEnable; spac << m_settings.m_OCFactor; @@ -1315,6 +1316,9 @@ bool NetPlayServer::StartGame() for (auto& device : m_settings.m_EXIDevice) spac << device; + for (u32 value : m_settings.m_SYSCONFSettings) + spac << value; + spac << m_settings.m_EFBAccessEnable; spac << m_settings.m_BBoxEnable; spac << m_settings.m_ForceProgressive; diff --git a/Source/Core/DolphinQt/NetPlay/NetPlayDialog.cpp b/Source/Core/DolphinQt/NetPlay/NetPlayDialog.cpp index c0e2d68e33..32bcfc8509 100644 --- a/Source/Core/DolphinQt/NetPlay/NetPlayDialog.cpp +++ b/Source/Core/DolphinQt/NetPlay/NetPlayDialog.cpp @@ -446,11 +446,12 @@ void NetPlayDialog::OnStart() settings.m_EnableCheats = Config::Get(Config::MAIN_ENABLE_CHEATS); settings.m_SelectedLanguage = Config::Get(Config::MAIN_GC_LANGUAGE); settings.m_OverrideRegionSettings = Config::Get(Config::MAIN_OVERRIDE_REGION_SETTINGS); - settings.m_ProgressiveScan = Config::Get(Config::SYSCONF_PROGRESSIVE_SCAN); - settings.m_PAL60 = Config::Get(Config::SYSCONF_PAL60); settings.m_DSPHLE = Config::Get(Config::MAIN_DSP_HLE); settings.m_DSPEnableJIT = Config::Get(Config::MAIN_DSP_JIT); settings.m_WriteToMemcard = m_save_sd_action->isChecked(); + settings.m_Mem1Size = Config::Get(Config::MAIN_MEM1_SIZE); + settings.m_Mem2Size = Config::Get(Config::MAIN_MEM2_SIZE); + settings.m_FallbackRegion = Config::Get(Config::MAIN_FALLBACK_REGION); settings.m_CopyWiiSave = m_load_wii_action->isChecked(); settings.m_OCEnable = Config::Get(Config::MAIN_OVERCLOCK_ENABLE); settings.m_OCFactor = Config::Get(Config::MAIN_OVERCLOCK); @@ -460,6 +461,17 @@ void NetPlayDialog::OnStart() static_cast(Config::Get(Config::MAIN_SLOT_B)); // There's no way the BBA is going to sync, disable it settings.m_EXIDevice[2] = ExpansionInterface::EXIDEVICE_NONE; + + for (size_t i = 0; i < Config::SYSCONF_SETTINGS.size(); ++i) + { + std::visit( + [&](auto* info) { + static_assert(sizeof(info->GetDefaultValue()) <= sizeof(u32)); + settings.m_SYSCONFSettings[i] = static_cast(Config::Get(*info)); + }, + Config::SYSCONF_SETTINGS[i].config_info); + } + settings.m_EFBAccessEnable = Config::Get(Config::GFX_HACK_EFB_ACCESS_ENABLE); settings.m_BBoxEnable = Config::Get(Config::GFX_HACK_BBOX_ENABLE); settings.m_ForceProgressive = Config::Get(Config::GFX_HACK_FORCE_PROGRESSIVE); From 359ed5348a712fc6eb19600c1482e11b7a754ccd Mon Sep 17 00:00:00 2001 From: JosJuice Date: Sat, 6 Mar 2021 20:00:07 +0100 Subject: [PATCH 2/5] Config: Give Movie and Netplay higher priority than CommandLine Avoiding desyncs is more important than honoring what the user specified on the command line. --- Source/Core/Common/Config/Enums.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Source/Core/Common/Config/Enums.h b/Source/Core/Common/Config/Enums.h index 5c75a01893..1999005401 100644 --- a/Source/Core/Common/Config/Enums.h +++ b/Source/Core/Common/Config/Enums.h @@ -8,14 +8,15 @@ namespace Config { +// Layers in ascending order of priority. enum class LayerType { Base, + CommandLine, GlobalGame, LocalGame, Movie, Netplay, - CommandLine, CurrentRun, Meta, }; @@ -36,11 +37,11 @@ enum class System constexpr std::array SEARCH_ORDER{{ LayerType::CurrentRun, - LayerType::CommandLine, - LayerType::Movie, LayerType::Netplay, + LayerType::Movie, LayerType::LocalGame, LayerType::GlobalGame, + LayerType::CommandLine, LayerType::Base, }}; } // namespace Config From 46dbb455e1be354b7fb910852229d5feb455f065 Mon Sep 17 00:00:00 2001 From: JosJuice Date: Sat, 6 Mar 2021 19:14:18 +0100 Subject: [PATCH 3/5] Boot: Initialize Wii root before saving SYSCONF file Fixes netplay and movie overrides of SYSCONF settings not applying. --- Source/Core/Core/BootManager.cpp | 28 +++++++++++++++---- .../Core/ConfigLoaders/BaseConfigLoader.cpp | 8 ++++-- .../Core/ConfigLoaders/BaseConfigLoader.h | 5 +++- Source/Core/Core/Core.cpp | 2 +- Source/Core/Core/HW/HW.cpp | 4 --- Source/Core/Core/WiiRoot.cpp | 11 ++++++-- Source/Core/Core/WiiRoot.h | 2 ++ 7 files changed, 44 insertions(+), 16 deletions(-) diff --git a/Source/Core/Core/BootManager.cpp b/Source/Core/Core/BootManager.cpp index a339ee80dd..617d51c24d 100644 --- a/Source/Core/Core/BootManager.cpp +++ b/Source/Core/Core/BootManager.cpp @@ -433,11 +433,23 @@ bool BootCore(std::unique_ptr boot, const WindowSystemInfo& wsi) if (StartUp.bWii && DiscIO::IsNTSC(StartUp.m_region) && Config::Get(Config::SYSCONF_PAL60)) Config::SetCurrent(Config::SYSCONF_PAL60, false); - // Ensure any new settings are written to the SYSCONF if (StartUp.bWii) { - Core::BackupWiiSettings(); - ConfigLoaders::SaveToSYSCONF(Config::LayerType::Meta); + const bool want_determinism = Movie::IsMovieActive() || NetPlay::IsNetPlayRunning(); + Core::InitializeWiiRoot(want_determinism); + + // Ensure any new settings are written to the SYSCONF + if (!want_determinism) + { + Core::BackupWiiSettings(); + ConfigLoaders::SaveToSYSCONF(Config::LayerType::Meta); + } + else + { + ConfigLoaders::SaveToSYSCONF(Config::LayerType::Meta, [](const Config::Location& location) { + return Config::GetActiveLayerForConfig(location) >= Config::LayerType::Movie; + }); + } } const bool load_ipl = !StartUp.bWii && !StartUp.bHLE_BS2 && @@ -486,8 +498,14 @@ static void RestoreSYSCONF() void RestoreConfig() { - Core::RestoreWiiSettings(Core::RestoreReason::EmulationEnd); - RestoreSYSCONF(); + Core::ShutdownWiiRoot(); + + if (!Core::WiiRootIsTemporary()) + { + Core::RestoreWiiSettings(Core::RestoreReason::EmulationEnd); + RestoreSYSCONF(); + } + Config::ClearCurrentRunLayer(); Config::RemoveLayer(Config::LayerType::Movie); Config::RemoveLayer(Config::LayerType::Netplay); diff --git a/Source/Core/Core/ConfigLoaders/BaseConfigLoader.cpp b/Source/Core/Core/ConfigLoaders/BaseConfigLoader.cpp index 65b46ec4bd..d3e340c68d 100644 --- a/Source/Core/Core/ConfigLoaders/BaseConfigLoader.cpp +++ b/Source/Core/Core/ConfigLoaders/BaseConfigLoader.cpp @@ -6,6 +6,7 @@ #include #include +#include #include #include #include @@ -29,7 +30,7 @@ namespace ConfigLoaders { -void SaveToSYSCONF(Config::LayerType layer) +void SaveToSYSCONF(Config::LayerType layer, std::function predicate) { if (Core::IsRunning()) return; @@ -40,7 +41,10 @@ void SaveToSYSCONF(Config::LayerType layer) for (const Config::SYSCONFSetting& setting : Config::SYSCONF_SETTINGS) { std::visit( - [layer, &setting, &sysconf](auto* info) { + [&](auto* info) { + if (predicate && !predicate(info->GetLocation())) + return; + const std::string key = info->GetLocation().section + "." + info->GetLocation().key; if (setting.type == SysConf::Entry::Type::Long) diff --git a/Source/Core/Core/ConfigLoaders/BaseConfigLoader.h b/Source/Core/Core/ConfigLoaders/BaseConfigLoader.h index 2082e405b3..1fc28674f5 100644 --- a/Source/Core/Core/ConfigLoaders/BaseConfigLoader.h +++ b/Source/Core/Core/ConfigLoaders/BaseConfigLoader.h @@ -4,16 +4,19 @@ #pragma once +#include #include namespace Config { class ConfigLayerLoader; enum class LayerType; +struct Location; } // namespace Config namespace ConfigLoaders { -void SaveToSYSCONF(Config::LayerType layer); +void SaveToSYSCONF(Config::LayerType layer, + std::function predicate = {}); std::unique_ptr GenerateBaseConfigLoader(); } // namespace ConfigLoaders diff --git a/Source/Core/Core/Core.cpp b/Source/Core/Core/Core.cpp index 99e7624b55..2fe18a7e67 100644 --- a/Source/Core/Core/Core.cpp +++ b/Source/Core/Core/Core.cpp @@ -590,7 +590,7 @@ static void EmuThread(std::unique_ptr boot, WindowSystemInfo wsi return; // Initialise Wii filesystem contents. - // This is done here after Boot and not in HW to ensure that we operate + // This is done here after Boot and not in BootManager to ensure that we operate // with the correct title context since save copying requires title directories to exist. Common::ScopeGuard wiifs_guard{&Core::CleanUpWiiFileSystemContents}; if (SConfig::GetInstance().bWii) diff --git a/Source/Core/Core/HW/HW.cpp b/Source/Core/Core/HW/HW.cpp index 654164d960..6e2cf7d17b 100644 --- a/Source/Core/Core/HW/HW.cpp +++ b/Source/Core/Core/HW/HW.cpp @@ -25,7 +25,6 @@ #include "Core/HW/WII_IPC.h" #include "Core/IOS/IOS.h" #include "Core/State.h" -#include "Core/WiiRoot.h" namespace HW { @@ -52,8 +51,6 @@ void Init() if (SConfig::GetInstance().bWii) { - // The NAND should only be initialised once per emulation session. - Core::InitializeWiiRoot(Core::WantsDeterminism()); IOS::Init(); IOS::HLE::Init(); // Depends on Memory } @@ -64,7 +61,6 @@ void Shutdown() // IOS should always be shut down regardless of bWii because it can be running in GC mode (MIOS). IOS::HLE::Shutdown(); // Depends on Memory IOS::Shutdown(); - Core::ShutdownWiiRoot(); SystemTimers::Shutdown(); CPU::Shutdown(); diff --git a/Source/Core/Core/WiiRoot.cpp b/Source/Core/Core/WiiRoot.cpp index b042edc039..9503b70b9e 100644 --- a/Source/Core/Core/WiiRoot.cpp +++ b/Source/Core/Core/WiiRoot.cpp @@ -202,13 +202,18 @@ void InitializeWiiRoot(bool use_temporary) void ShutdownWiiRoot() { - if (!s_temp_wii_root.empty()) + if (WiiRootIsTemporary()) { File::DeleteDirRecursively(s_temp_wii_root); s_temp_wii_root.clear(); } } +bool WiiRootIsTemporary() +{ + return !s_temp_wii_root.empty(); +} + void BackupWiiSettings() { // Back up files which Dolphin can modify at boot, so that we can preserve the original contents. @@ -282,7 +287,7 @@ void InitializeWiiFileSystemContents() if (!CopySysmenuFilesToFS(fs.get(), File::GetSysDirectory() + WII_USER_DIR, "")) WARN_LOG_FMT(CORE, "Failed to copy initial System Menu files to the NAND"); - if (s_temp_wii_root.empty()) + if (!WiiRootIsTemporary()) return; // Generate a SYSCONF with default settings for the temporary Wii NAND. @@ -294,7 +299,7 @@ void InitializeWiiFileSystemContents() void CleanUpWiiFileSystemContents() { - if (s_temp_wii_root.empty() || !SConfig::GetInstance().bEnableMemcardSdWriting || + if (!WiiRootIsTemporary() || !SConfig::GetInstance().bEnableMemcardSdWriting || NetPlay::GetWiiSyncFS()) { return; diff --git a/Source/Core/Core/WiiRoot.h b/Source/Core/Core/WiiRoot.h index 7b069d0c07..ad4ac609b9 100644 --- a/Source/Core/Core/WiiRoot.h +++ b/Source/Core/Core/WiiRoot.h @@ -15,6 +15,8 @@ enum class RestoreReason void InitializeWiiRoot(bool use_temporary); void ShutdownWiiRoot(); +bool WiiRootIsTemporary(); + void BackupWiiSettings(); void RestoreWiiSettings(RestoreReason reason); From 1dfeb7358911c58eaf80d2605013c34cec560ad0 Mon Sep 17 00:00:00 2001 From: JosJuice Date: Sat, 6 Mar 2021 22:01:12 +0100 Subject: [PATCH 4/5] Force RTC bias to 0 when custom RTC is disabled too Whether the custom RTC setting is enabled shouldn't in itself affect determinism (as long as the actual RTC value is properly synced). Alters the logic added in 4b2906c. I'm not entirely certain that this is correct, but the current code doesn't really make sense to me... If we need to force the RTC bias to 0 when custom RTC is enabled, why don't we need to do it when custom RTC is disabled? The code for getting the host system's current time doesn't contain any special handling for the guest's RTC bias as far as I can tell. --- Source/Core/Core/ConfigLoaders/BaseConfigLoader.cpp | 3 +-- Source/Core/Core/HW/EXI/EXI_DeviceIPL.cpp | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/Source/Core/Core/ConfigLoaders/BaseConfigLoader.cpp b/Source/Core/Core/ConfigLoaders/BaseConfigLoader.cpp index d3e340c68d..254237df9a 100644 --- a/Source/Core/Core/ConfigLoaders/BaseConfigLoader.cpp +++ b/Source/Core/Core/ConfigLoaders/BaseConfigLoader.cpp @@ -68,8 +68,7 @@ void SaveToSYSCONF(Config::LayerType layer, std::function("IPL.CB", SysConf::Entry::Type::Long, 0); + sysconf.SetData("IPL.CB", SysConf::Entry::Type::Long, 0); // Disable WiiConnect24's standby mode. If it is enabled, it prevents us from receiving // shutdown commands in the State Transition Manager (STM). diff --git a/Source/Core/Core/HW/EXI/EXI_DeviceIPL.cpp b/Source/Core/Core/HW/EXI/EXI_DeviceIPL.cpp index 0769ea41af..99177d21a2 100644 --- a/Source/Core/Core/HW/EXI/EXI_DeviceIPL.cpp +++ b/Source/Core/Core/HW/EXI/EXI_DeviceIPL.cpp @@ -136,8 +136,7 @@ CEXIIPL::CEXIIPL() // We Overwrite language selection here since it's possible on the GC to change the language as // you please g_SRAM.settings.language = SConfig::GetInstance().SelectedLanguage; - if (SConfig::GetInstance().bEnableCustomRTC) - g_SRAM.settings.rtc_bias = 0; + g_SRAM.settings.rtc_bias = 0; FixSRAMChecksums(); } From 74343b427605bf59e6cf1b69dc5e330fac50e905 Mon Sep 17 00:00:00 2001 From: JosJuice Date: Thu, 18 Mar 2021 22:59:59 +0100 Subject: [PATCH 5/5] Boot: Move initial UpdateWantDeterminism call earlier Just to make the InitializeWiiRoot call a bit neater. --- Source/Core/Core/BootManager.cpp | 7 ++++--- Source/Core/Core/Core.cpp | 2 -- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/Source/Core/Core/BootManager.cpp b/Source/Core/Core/BootManager.cpp index 617d51c24d..78b191e1e7 100644 --- a/Source/Core/Core/BootManager.cpp +++ b/Source/Core/Core/BootManager.cpp @@ -433,13 +433,14 @@ bool BootCore(std::unique_ptr boot, const WindowSystemInfo& wsi) if (StartUp.bWii && DiscIO::IsNTSC(StartUp.m_region) && Config::Get(Config::SYSCONF_PAL60)) Config::SetCurrent(Config::SYSCONF_PAL60, false); + Core::UpdateWantDeterminism(/*initial*/ true); + if (StartUp.bWii) { - const bool want_determinism = Movie::IsMovieActive() || NetPlay::IsNetPlayRunning(); - Core::InitializeWiiRoot(want_determinism); + Core::InitializeWiiRoot(Core::WantsDeterminism()); // Ensure any new settings are written to the SYSCONF - if (!want_determinism) + if (!Core::WantsDeterminism()) { Core::BackupWiiSettings(); ConfigLoaders::SaveToSYSCONF(Config::LayerType::Meta); diff --git a/Source/Core/Core/Core.cpp b/Source/Core/Core/Core.cpp index 2fe18a7e67..6f2007f069 100644 --- a/Source/Core/Core/Core.cpp +++ b/Source/Core/Core/Core.cpp @@ -231,8 +231,6 @@ bool Init(std::unique_ptr boot, const WindowSystemInfo& wsi) // Drain any left over jobs HostDispatchJobs(); - Core::UpdateWantDeterminism(/*initial*/ true); - INFO_LOG_FMT(BOOT, "Starting core = {} mode", SConfig::GetInstance().bWii ? "Wii" : "GameCube"); INFO_LOG_FMT(BOOT, "CPU Thread separate = {}", SConfig::GetInstance().bCPUThread ? "Yes" : "No");