Skip to content
Permalink
Browse files

ConfigManager: add save/load for Jit debug options

  • Loading branch information...
zackhow committed Dec 3, 2018
1 parent f5e9135 commit 233b00fb7e5a743ffc9da0ed5467f185041ea31d
Showing with 33 additions and 0 deletions.
  1. +31 −0 Source/Core/Core/ConfigManager.cpp
  2. +2 −0 Source/Core/Core/ConfigManager.h
@@ -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);
@@ -349,6 +349,7 @@ struct SConfig
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 @@ struct SConfig
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);

0 comments on commit 233b00f

Please sign in to comment.
You can’t perform that action at this time.