Formatting and setting is now only temporarily changed (#1)

Add the cheat setting to the bootmanager config cache, and reformat
This commit is contained in:
JDV 2016-07-04 17:48:04 -06:00 committed by mathieui
parent 8a2e7fddd1
commit d6a2fcd26c
5 changed files with 9 additions and 5 deletions

View File

@ -63,6 +63,7 @@ public:
private: private:
bool valid; bool valid;
bool bCPUThread; bool bCPUThread;
bool bEnableCheats;
bool bSkipIdle; bool bSkipIdle;
bool bSyncGPUOnSkipIdleHack; bool bSyncGPUOnSkipIdleHack;
bool bFPRF; bool bFPRF;
@ -94,6 +95,7 @@ void ConfigCache::SaveConfig(const SConfig& config)
valid = true; valid = true;
bCPUThread = config.bCPUThread; bCPUThread = config.bCPUThread;
bEnableCheats = config.bEnableCheats;
bSkipIdle = config.bSkipIdle; bSkipIdle = config.bSkipIdle;
bSyncGPUOnSkipIdleHack = config.bSyncGPUOnSkipIdleHack; bSyncGPUOnSkipIdleHack = config.bSyncGPUOnSkipIdleHack;
bFPRF = config.bFPRF; bFPRF = config.bFPRF;
@ -136,6 +138,7 @@ void ConfigCache::RestoreConfig(SConfig* config)
valid = false; valid = false;
config->bCPUThread = bCPUThread; config->bCPUThread = bCPUThread;
config->bEnableCheats = bEnableCheats;
config->bSkipIdle = bSkipIdle; config->bSkipIdle = bSkipIdle;
config->bSyncGPUOnSkipIdleHack = bSyncGPUOnSkipIdleHack; config->bSyncGPUOnSkipIdleHack = bSyncGPUOnSkipIdleHack;
config->bFPRF = bFPRF; config->bFPRF = bFPRF;
@ -245,6 +248,7 @@ bool BootCore(const std::string& _rFilename)
IniFile::Section* controls_section = game_ini.GetOrCreateSection("Controls"); IniFile::Section* controls_section = game_ini.GetOrCreateSection("Controls");
core_section->Get("CPUThread", &StartUp.bCPUThread, StartUp.bCPUThread); core_section->Get("CPUThread", &StartUp.bCPUThread, StartUp.bCPUThread);
core_section->Get("EnableCheats", &StartUp.bEnableCheats, StartUp.bEnableCheats);
core_section->Get("SkipIdle", &StartUp.bSkipIdle, StartUp.bSkipIdle); core_section->Get("SkipIdle", &StartUp.bSkipIdle, StartUp.bSkipIdle);
core_section->Get("SyncOnSkipIdle", &StartUp.bSyncGPUOnSkipIdleHack, core_section->Get("SyncOnSkipIdle", &StartUp.bSyncGPUOnSkipIdleHack,
StartUp.bSyncGPUOnSkipIdleHack); StartUp.bSyncGPUOnSkipIdleHack);
@ -347,7 +351,7 @@ bool BootCore(const std::string& _rFilename)
if (NetPlay::IsNetPlayRunning()) if (NetPlay::IsNetPlayRunning())
{ {
StartUp.bCPUThread = g_NetPlaySettings.m_CPUthread; StartUp.bCPUThread = g_NetPlaySettings.m_CPUthread;
StartUp.bEnableCheats = g_NetPlaySettings.m_enableCheats; StartUp.bEnableCheats = g_NetPlaySettings.m_EnableCheats;
StartUp.bDSPHLE = g_NetPlaySettings.m_DSPHLE; StartUp.bDSPHLE = g_NetPlaySettings.m_DSPHLE;
StartUp.bEnableMemcardSdWriting = g_NetPlaySettings.m_WriteToMemcard; StartUp.bEnableMemcardSdWriting = g_NetPlaySettings.m_WriteToMemcard;
StartUp.iCPUCore = g_NetPlaySettings.m_CPUcore; StartUp.iCPUCore = g_NetPlaySettings.m_CPUcore;

View File

@ -367,7 +367,7 @@ unsigned int NetPlayClient::OnData(sf::Packet& packet)
packet >> m_current_game; packet >> m_current_game;
packet >> g_NetPlaySettings.m_CPUthread; packet >> g_NetPlaySettings.m_CPUthread;
packet >> g_NetPlaySettings.m_CPUcore; packet >> g_NetPlaySettings.m_CPUcore;
packet >> g_NetPlaySettings.m_enableCheats; packet >> g_NetPlaySettings.m_EnableCheats;
packet >> g_NetPlaySettings.m_SelectedLanguage; packet >> g_NetPlaySettings.m_SelectedLanguage;
packet >> g_NetPlaySettings.m_OverrideGCLanguage; packet >> g_NetPlaySettings.m_OverrideGCLanguage;
packet >> g_NetPlaySettings.m_ProgressiveScan; packet >> g_NetPlaySettings.m_ProgressiveScan;

View File

@ -13,7 +13,7 @@ struct NetSettings
{ {
bool m_CPUthread; bool m_CPUthread;
int m_CPUcore; int m_CPUcore;
bool m_enableCheats; bool m_EnableCheats;
int m_SelectedLanguage; int m_SelectedLanguage;
bool m_OverrideGCLanguage; bool m_OverrideGCLanguage;
bool m_ProgressiveScan; bool m_ProgressiveScan;

View File

@ -712,7 +712,7 @@ bool NetPlayServer::StartGame()
*spac << m_current_game; *spac << m_current_game;
*spac << m_settings.m_CPUthread; *spac << m_settings.m_CPUthread;
*spac << m_settings.m_CPUcore; *spac << m_settings.m_CPUcore;
*spac << m_settings.m_enableCheats; *spac << m_settings.m_EnableCheats;
*spac << m_settings.m_SelectedLanguage; *spac << m_settings.m_SelectedLanguage;
*spac << m_settings.m_OverrideGCLanguage; *spac << m_settings.m_OverrideGCLanguage;
*spac << m_settings.m_ProgressiveScan; *spac << m_settings.m_ProgressiveScan;

View File

@ -274,7 +274,7 @@ void NetPlayDialog::GetNetSettings(NetSettings& settings)
SConfig& instance = SConfig::GetInstance(); SConfig& instance = SConfig::GetInstance();
settings.m_CPUthread = instance.bCPUThread; settings.m_CPUthread = instance.bCPUThread;
settings.m_CPUcore = instance.iCPUCore; settings.m_CPUcore = instance.iCPUCore;
settings.m_enableCheats = instance.bEnableCheats; settings.m_EnableCheats = instance.bEnableCheats;
settings.m_SelectedLanguage = instance.SelectedLanguage; settings.m_SelectedLanguage = instance.SelectedLanguage;
settings.m_OverrideGCLanguage = instance.bOverrideGCLanguage; settings.m_OverrideGCLanguage = instance.bOverrideGCLanguage;
settings.m_ProgressiveScan = instance.bProgressive; settings.m_ProgressiveScan = instance.bProgressive;