diff --git a/Source/Core/Core/Config/MainSettings.cpp b/Source/Core/Core/Config/MainSettings.cpp index 67325e6c7c..d0b5a1ab01 100644 --- a/Source/Core/Core/Config/MainSettings.cpp +++ b/Source/Core/Core/Config/MainSettings.cpp @@ -248,4 +248,8 @@ const Info MAIN_GAMELIST_COLUMN_COMPRESSION{{System::Main, "GameList", "Co false}; const Info MAIN_GAMELIST_COLUMN_TAGS{{System::Main, "GameList", "ColumnTags"}, false}; +// Main.FifoPlayer + +const Info MAIN_FIFOPLAYER_LOOP_REPLAY{{System::Main, "FifoPlayer", "LoopReplay"}, true}; + } // namespace Config diff --git a/Source/Core/Core/Config/MainSettings.h b/Source/Core/Core/Config/MainSettings.h index 0837784fd8..91816519e7 100644 --- a/Source/Core/Core/Config/MainSettings.h +++ b/Source/Core/Core/Config/MainSettings.h @@ -210,4 +210,9 @@ extern const Info MAIN_GAMELIST_COLUMN_FILE_FORMAT; extern const Info MAIN_GAMELIST_COLUMN_BLOCK_SIZE; extern const Info MAIN_GAMELIST_COLUMN_COMPRESSION; extern const Info MAIN_GAMELIST_COLUMN_TAGS; + +// Main.FifoPlayer + +extern const Info MAIN_FIFOPLAYER_LOOP_REPLAY; + } // namespace Config diff --git a/Source/Core/Core/ConfigLoaders/IsSettingSaveable.cpp b/Source/Core/Core/ConfigLoaders/IsSettingSaveable.cpp index 281b77d77a..7756df6f7d 100644 --- a/Source/Core/Core/ConfigLoaders/IsSettingSaveable.cpp +++ b/Source/Core/Core/ConfigLoaders/IsSettingSaveable.cpp @@ -25,8 +25,9 @@ bool IsSettingSaveable(const Config::Location& config_location) if (config_location.system == Config::System::Main) { - for (const std::string_view section : {"NetPlay", "General", "GBA", "Display", "Network", - "Analytics", "AndroidOverlayButtons", "DSP", "GameList"}) + for (const std::string_view section : + {"NetPlay", "General", "GBA", "Display", "Network", "Analytics", "AndroidOverlayButtons", + "DSP", "GameList", "FifoPlayer"}) { if (config_location.section == section) return true; diff --git a/Source/Core/Core/ConfigManager.cpp b/Source/Core/Core/ConfigManager.cpp index 87e931d613..cda80e9884 100644 --- a/Source/Core/Core/ConfigManager.cpp +++ b/Source/Core/Core/ConfigManager.cpp @@ -93,7 +93,6 @@ void SConfig::SaveSettings() SaveCoreSettings(ini); SaveMovieSettings(ini); SaveInputSettings(ini); - SaveFifoPlayerSettings(ini); SaveBluetoothPassthroughSettings(ini); SaveUSBPassthroughSettings(ini); SaveAutoUpdateSettings(ini); @@ -221,13 +220,6 @@ void SConfig::SaveInputSettings(IniFile& ini) input->Set("BackgroundInput", m_BackgroundInput); } -void SConfig::SaveFifoPlayerSettings(IniFile& ini) -{ - IniFile::Section* fifoplayer = ini.GetOrCreateSection("FifoPlayer"); - - fifoplayer->Set("LoopReplay", bLoopFifoReplay); -} - void SConfig::SaveBluetoothPassthroughSettings(IniFile& ini) { IniFile::Section* section = ini.GetOrCreateSection("BluetoothPassthrough"); @@ -289,7 +281,6 @@ void SConfig::LoadSettings() LoadCoreSettings(ini); LoadMovieSettings(ini); LoadInputSettings(ini); - LoadFifoPlayerSettings(ini); LoadBluetoothPassthroughSettings(ini); LoadUSBPassthroughSettings(ini); LoadAutoUpdateSettings(ini); @@ -422,13 +413,6 @@ void SConfig::LoadInputSettings(IniFile& ini) input->Get("BackgroundInput", &m_BackgroundInput, false); } -void SConfig::LoadFifoPlayerSettings(IniFile& ini) -{ - IniFile::Section* fifoplayer = ini.GetOrCreateSection("FifoPlayer"); - - fifoplayer->Get("LoopReplay", &bLoopFifoReplay, true); -} - void SConfig::LoadBluetoothPassthroughSettings(IniFile& ini) { IniFile::Section* section = ini.GetOrCreateSection("BluetoothPassthrough"); @@ -620,8 +604,6 @@ void SConfig::LoadDefaults() bOverrideRegionSettings = false; bWii = false; - bLoopFifoReplay = true; - bJITOff = false; // debugger only settings bJITLoadStoreOff = false; bJITLoadStoreFloatingOff = false; diff --git a/Source/Core/Core/ConfigManager.h b/Source/Core/Core/ConfigManager.h index 35603b5ad1..5fc2669637 100644 --- a/Source/Core/Core/ConfigManager.h +++ b/Source/Core/Core/ConfigManager.h @@ -151,9 +151,6 @@ struct SConfig std::set> m_usb_passthrough_devices; bool IsUSBDeviceWhitelisted(std::pair vid_pid) const; - // Fifo Player related settings - bool bLoopFifoReplay = true; - // Custom RTC bool bEnableCustomRTC; u32 m_customRTCValue; @@ -273,7 +270,6 @@ private: void SaveCoreSettings(IniFile& ini); void SaveInputSettings(IniFile& ini); void SaveMovieSettings(IniFile& ini); - void SaveFifoPlayerSettings(IniFile& ini); void SaveBluetoothPassthroughSettings(IniFile& ini); void SaveUSBPassthroughSettings(IniFile& ini); void SaveAutoUpdateSettings(IniFile& ini); @@ -284,7 +280,6 @@ private: void LoadCoreSettings(IniFile& ini); void LoadInputSettings(IniFile& ini); void LoadMovieSettings(IniFile& ini); - void LoadFifoPlayerSettings(IniFile& ini); void LoadBluetoothPassthroughSettings(IniFile& ini); void LoadUSBPassthroughSettings(IniFile& ini); void LoadAutoUpdateSettings(IniFile& ini); diff --git a/Source/Core/Core/FifoPlayer/FifoPlayer.cpp b/Source/Core/Core/FifoPlayer/FifoPlayer.cpp index e579ae547f..6a48352060 100644 --- a/Source/Core/Core/FifoPlayer/FifoPlayer.cpp +++ b/Source/Core/Core/FifoPlayer/FifoPlayer.cpp @@ -10,7 +10,7 @@ #include "Common/Assert.h" #include "Common/CommonTypes.h" #include "Common/MsgHandler.h" -#include "Core/ConfigManager.h" +#include "Core/Config/MainSettings.h" #include "Core/Core.h" #include "Core/CoreTiming.h" #include "Core/FifoPlayer/FifoDataFile.h" @@ -163,7 +163,7 @@ void FifoPlaybackAnalyzer::OnCommand(const u8* data, u32 size) bool IsPlayingBackFifologWithBrokenEFBCopies = false; -FifoPlayer::FifoPlayer() : m_Loop{SConfig::GetInstance().bLoopFifoReplay} +FifoPlayer::FifoPlayer() : m_Loop{Config::Get(Config::MAIN_FIFOPLAYER_LOOP_REPLAY)} { }