diff --git a/Source/Core/Core/ConfigManager.cpp b/Source/Core/Core/ConfigManager.cpp index dc826fc155..95b1222c17 100644 --- a/Source/Core/Core/ConfigManager.cpp +++ b/Source/Core/Core/ConfigManager.cpp @@ -92,6 +92,7 @@ void SConfig::SaveSettings() SaveBluetoothPassthroughSettings(ini); SaveUSBPassthroughSettings(ini); SaveAutoUpdateSettings(ini); + SaveJitDebugSettings(ini); ini.Save(File::GetUserPath(F_DOLPHINCONFIG_IDX)); @@ -352,6 +353,21 @@ void SConfig::SaveAutoUpdateSettings(IniFile& ini) section->Set("HashOverride", m_auto_update_hash_override); } +void SConfig::SaveJitDebugSettings(IniFile& ini) +{ + IniFile::Section* section = ini.GetOrCreateSection("Debug"); + + section->Set("JitOff", bJITOff); + section->Set("JitLoadStoreOff", bJITLoadStoreOff); + section->Set("JitLoadStoreFloatingOff", bJITLoadStoreFloatingOff); + section->Set("JitLoadStorePairedOff", bJITLoadStorePairedOff); + section->Set("JitFloatingPointOff", bJITFloatingPointOff); + section->Set("JitIntegerOff", bJITIntegerOff); + section->Set("JitPairedOff", bJITPairedOff); + section->Set("JitSystemRegistersOff", bJITSystemRegistersOff); + section->Set("JitBranchOff", bJITBranchOff); +} + void SConfig::LoadSettings() { Config::Load(); @@ -374,6 +390,7 @@ void SConfig::LoadSettings() LoadBluetoothPassthroughSettings(ini); LoadUSBPassthroughSettings(ini); LoadAutoUpdateSettings(ini); + LoadJitDebugSettings(ini); } void SConfig::LoadGeneralSettings(IniFile& ini) @@ -647,6 +664,20 @@ void SConfig::LoadAutoUpdateSettings(IniFile& ini) section->Get("HashOverride", &m_auto_update_hash_override, ""); } +void SConfig::LoadJitDebugSettings(IniFile& ini) +{ + IniFile::Section* section = ini.GetOrCreateSection("Debug"); + section->Get("JitOff", &bJITOff, false); + section->Get("JitLoadStoreOff", &bJITLoadStoreOff, false); + section->Get("JitLoadStoreFloatingOff", &bJITLoadStoreFloatingOff, false); + section->Get("JitLoadStorePairedOff", &bJITLoadStorePairedOff, false); + section->Get("JitFloatingPointOff", &bJITFloatingPointOff, false); + section->Get("JitIntegerOff", &bJITIntegerOff, false); + section->Get("JitPairedOff", &bJITPairedOff, false); + section->Get("JitSystemRegistersOff", &bJITSystemRegistersOff, false); + section->Get("JitBranchOff", &bJITBranchOff, false); +} + void SConfig::ResetRunningGameMetadata() { SetRunningGameMetadata("00000000", 0, 0, Core::TitleDatabase::TitleType::Other); diff --git a/Source/Core/Core/ConfigManager.h b/Source/Core/Core/ConfigManager.h index 2aae8c31d1..8b95fde543 100644 --- a/Source/Core/Core/ConfigManager.h +++ b/Source/Core/Core/ConfigManager.h @@ -349,6 +349,7 @@ private: void SaveBluetoothPassthroughSettings(IniFile& ini); void SaveUSBPassthroughSettings(IniFile& ini); void SaveAutoUpdateSettings(IniFile& ini); + void SaveJitDebugSettings(IniFile& ini); void LoadGeneralSettings(IniFile& ini); void LoadInterfaceSettings(IniFile& ini); @@ -364,6 +365,7 @@ private: void LoadBluetoothPassthroughSettings(IniFile& ini); void LoadUSBPassthroughSettings(IniFile& ini); void LoadAutoUpdateSettings(IniFile& ini); + void LoadJitDebugSettings(IniFile& ini); void SetRunningGameMetadata(const std::string& game_id, u64 title_id, u16 revision, Core::TitleDatabase::TitleType type);