mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-22 13:49:53 -06:00
Port Main.DSP to MainSettings
While trying to work on adding audiodump support for CLI, I was alerted that it was important to first try moving the DSP configs to the new config before continuing, as that makes it substantially easier to write clean code to add such a feature. This commit aims to allow for Dolphin to only rely on the new config for DSP-related settings.
This commit is contained in:
@ -82,22 +82,18 @@ private:
|
||||
bool bMMU = false;
|
||||
bool bLowDCBZHack = false;
|
||||
bool bDisableICache = false;
|
||||
bool m_EnableJIT = false;
|
||||
bool bSyncGPU = false;
|
||||
int iSyncGpuMaxDistance = 0;
|
||||
int iSyncGpuMinDistance = 0;
|
||||
float fSyncGpuOverclock = 0;
|
||||
bool bFastDiscSpeed = false;
|
||||
bool bDSPHLE = false;
|
||||
bool bHLE_BS2 = false;
|
||||
int iSelectedLanguage = 0;
|
||||
PowerPC::CPUCore cpu_core = PowerPC::CPUCore::Interpreter;
|
||||
int Volume = 0;
|
||||
float m_EmulationSpeed = 0;
|
||||
float m_OCFactor = 0;
|
||||
bool m_OCEnable = false;
|
||||
bool m_bt_passthrough_enabled = false;
|
||||
std::string sBackend;
|
||||
std::string m_strGPUDeterminismMode;
|
||||
std::array<WiimoteSource, MAX_BBMOTES> iWiimoteSource{};
|
||||
std::array<SerialInterface::SIDevices, SerialInterface::MAX_SI_CHANNELS> Pads{};
|
||||
@ -117,19 +113,15 @@ void ConfigCache::SaveConfig(const SConfig& config)
|
||||
bAccurateNaNs = config.bAccurateNaNs;
|
||||
bDisableICache = config.bDisableICache;
|
||||
bMMU = config.bMMU;
|
||||
m_EnableJIT = config.m_DSPEnableJIT;
|
||||
bSyncGPU = config.bSyncGPU;
|
||||
iSyncGpuMaxDistance = config.iSyncGpuMaxDistance;
|
||||
iSyncGpuMinDistance = config.iSyncGpuMinDistance;
|
||||
fSyncGpuOverclock = config.fSyncGpuOverclock;
|
||||
bFastDiscSpeed = config.bFastDiscSpeed;
|
||||
bDSPHLE = config.bDSPHLE;
|
||||
bHLE_BS2 = config.bHLE_BS2;
|
||||
iSelectedLanguage = config.SelectedLanguage;
|
||||
cpu_core = config.cpu_core;
|
||||
Volume = config.m_Volume;
|
||||
m_EmulationSpeed = config.m_EmulationSpeed;
|
||||
sBackend = config.sBackend;
|
||||
m_strGPUDeterminismMode = config.m_strGPUDeterminismMode;
|
||||
m_OCFactor = config.m_OCFactor;
|
||||
m_OCEnable = config.m_OCEnable;
|
||||
@ -165,22 +157,17 @@ void ConfigCache::RestoreConfig(SConfig* config)
|
||||
config->bDisableICache = bDisableICache;
|
||||
config->bMMU = bMMU;
|
||||
config->bLowDCBZHack = bLowDCBZHack;
|
||||
config->m_DSPEnableJIT = m_EnableJIT;
|
||||
config->bSyncGPU = bSyncGPU;
|
||||
config->iSyncGpuMaxDistance = iSyncGpuMaxDistance;
|
||||
config->iSyncGpuMinDistance = iSyncGpuMinDistance;
|
||||
config->fSyncGpuOverclock = fSyncGpuOverclock;
|
||||
config->bFastDiscSpeed = bFastDiscSpeed;
|
||||
config->bDSPHLE = bDSPHLE;
|
||||
config->bHLE_BS2 = bHLE_BS2;
|
||||
config->SelectedLanguage = iSelectedLanguage;
|
||||
config->cpu_core = cpu_core;
|
||||
|
||||
// Only change these back if they were actually set by game ini, since they can be changed while a
|
||||
// game is running.
|
||||
if (bSetVolume)
|
||||
config->m_Volume = Volume;
|
||||
|
||||
if (config->bWii)
|
||||
{
|
||||
for (unsigned int i = 0; i < MAX_BBMOTES; ++i)
|
||||
@ -205,7 +192,6 @@ void ConfigCache::RestoreConfig(SConfig* config)
|
||||
config->m_EXIDevice[i] = m_EXIDevice[i];
|
||||
}
|
||||
|
||||
config->sBackend = sBackend;
|
||||
config->m_strGPUDeterminismMode = m_strGPUDeterminismMode;
|
||||
config->m_OCFactor = m_OCFactor;
|
||||
config->m_OCEnable = m_OCEnable;
|
||||
@ -255,7 +241,6 @@ bool BootCore(std::unique_ptr<BootParameters> boot, const WindowSystemInfo& wsi)
|
||||
|
||||
// General settings
|
||||
IniFile::Section* core_section = game_ini.GetOrCreateSection("Core");
|
||||
IniFile::Section* dsp_section = game_ini.GetOrCreateSection("DSP");
|
||||
IniFile::Section* controls_section = game_ini.GetOrCreateSection("Controls");
|
||||
|
||||
core_section->Get("CPUThread", &StartUp.bCPUThread, StartUp.bCPUThread);
|
||||
@ -272,17 +257,12 @@ bool BootCore(std::unique_ptr<BootParameters> boot, const WindowSystemInfo& wsi)
|
||||
core_section->Get("LowDCBZHack", &StartUp.bLowDCBZHack, StartUp.bLowDCBZHack);
|
||||
core_section->Get("SyncGPU", &StartUp.bSyncGPU, StartUp.bSyncGPU);
|
||||
core_section->Get("FastDiscSpeed", &StartUp.bFastDiscSpeed, StartUp.bFastDiscSpeed);
|
||||
core_section->Get("DSPHLE", &StartUp.bDSPHLE, StartUp.bDSPHLE);
|
||||
core_section->Get("CPUCore", &StartUp.cpu_core, StartUp.cpu_core);
|
||||
core_section->Get("HLE_BS2", &StartUp.bHLE_BS2, StartUp.bHLE_BS2);
|
||||
core_section->Get("GameCubeLanguage", &StartUp.SelectedLanguage, StartUp.SelectedLanguage);
|
||||
if (core_section->Get("EmulationSpeed", &StartUp.m_EmulationSpeed, StartUp.m_EmulationSpeed))
|
||||
config_cache.bSetEmulationSpeed = true;
|
||||
|
||||
if (dsp_section->Get("Volume", &StartUp.m_Volume, StartUp.m_Volume))
|
||||
config_cache.bSetVolume = true;
|
||||
dsp_section->Get("EnableJIT", &StartUp.m_DSPEnableJIT, StartUp.m_DSPEnableJIT);
|
||||
dsp_section->Get("Backend", &StartUp.sBackend, StartUp.sBackend);
|
||||
core_section->Get("GPUDeterminismMode", &StartUp.m_strGPUDeterminismMode,
|
||||
StartUp.m_strGPUDeterminismMode);
|
||||
core_section->Get("Overclock", &StartUp.m_OCFactor, StartUp.m_OCFactor);
|
||||
@ -334,7 +314,6 @@ bool BootCore(std::unique_ptr<BootParameters> boot, const WindowSystemInfo& wsi)
|
||||
// TODO: remove this once ConfigManager starts using OnionConfig.
|
||||
StartUp.bCPUThread = Config::Get(Config::MAIN_CPU_THREAD);
|
||||
StartUp.bJITFollowBranch = Config::Get(Config::MAIN_JIT_FOLLOW_BRANCH);
|
||||
StartUp.bDSPHLE = Config::Get(Config::MAIN_DSP_HLE);
|
||||
StartUp.bFastDiscSpeed = Config::Get(Config::MAIN_FAST_DISC_SPEED);
|
||||
StartUp.cpu_core = Config::Get(Config::MAIN_CPU_CORE);
|
||||
StartUp.bSyncGPU = Config::Get(Config::MAIN_SYNC_GPU);
|
||||
@ -361,12 +340,10 @@ bool BootCore(std::unique_ptr<BootParameters> boot, const WindowSystemInfo& wsi)
|
||||
const NetPlay::NetSettings& netplay_settings = NetPlay::GetNetSettings();
|
||||
Config::AddLayer(ConfigLoaders::GenerateNetPlayConfigLoader(netplay_settings));
|
||||
StartUp.bCPUThread = netplay_settings.m_CPUthread;
|
||||
StartUp.bDSPHLE = netplay_settings.m_DSPHLE;
|
||||
StartUp.bCopyWiiSaveNetplay = netplay_settings.m_CopyWiiSave;
|
||||
StartUp.cpu_core = netplay_settings.m_CPUcore;
|
||||
StartUp.SelectedLanguage = netplay_settings.m_SelectedLanguage;
|
||||
StartUp.bOverrideRegionSettings = netplay_settings.m_OverrideRegionSettings;
|
||||
StartUp.m_DSPEnableJIT = netplay_settings.m_DSPEnableJIT;
|
||||
StartUp.m_OCEnable = netplay_settings.m_OCEnable;
|
||||
StartUp.m_OCFactor = netplay_settings.m_OCFactor;
|
||||
StartUp.m_EXIDevice[0] = netplay_settings.m_EXIDevice[0];
|
||||
|
Reference in New Issue
Block a user