fix for r6337: don't restore cached settings if a gameconfig was not used.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6340 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Shawn Hoffman 2010-11-04 12:50:44 +00:00
parent de62a190f1
commit 45c92d27f2

View File

@ -67,7 +67,7 @@ namespace BootManager
// Apply fire liberally // Apply fire liberally
struct ConfigCache struct ConfigCache
{ {
bool bCPUThread, bSkipIdle, bEnableFPRF, bMMU, bMMUBAT, bool valid, bCPUThread, bSkipIdle, bEnableFPRF, bMMU, bMMUBAT,
bAlternateRFI, bFastDiscSpeed, bMergeBlocks; bAlternateRFI, bFastDiscSpeed, bMergeBlocks;
int iTLBHack; int iTLBHack;
}; };
@ -112,6 +112,7 @@ bool BootCore(const std::string& _rFilename)
StartUp.m_strGameIni = std::string(File::GetUserPath(D_GAMECONFIG_IDX)) + unique_id + ".ini"; StartUp.m_strGameIni = std::string(File::GetUserPath(D_GAMECONFIG_IDX)) + unique_id + ".ini";
if (unique_id.size() == 6 && game_ini.Load(StartUp.m_strGameIni.c_str())) if (unique_id.size() == 6 && game_ini.Load(StartUp.m_strGameIni.c_str()))
{ {
config_cache.valid = true;
config_cache.bCPUThread = StartUp.bCPUThread; config_cache.bCPUThread = StartUp.bCPUThread;
config_cache.bSkipIdle = StartUp.bSkipIdle; config_cache.bSkipIdle = StartUp.bSkipIdle;
config_cache.bEnableFPRF = StartUp.bEnableFPRF; config_cache.bEnableFPRF = StartUp.bEnableFPRF;
@ -170,6 +171,9 @@ void Stop()
SCoreStartupParameter& StartUp = SConfig::GetInstance().m_LocalCoreStartupParameter; SCoreStartupParameter& StartUp = SConfig::GetInstance().m_LocalCoreStartupParameter;
if (config_cache.valid)
{
config_cache.valid = false;
StartUp.bCPUThread = config_cache.bCPUThread; StartUp.bCPUThread = config_cache.bCPUThread;
StartUp.bSkipIdle = config_cache.bSkipIdle; StartUp.bSkipIdle = config_cache.bSkipIdle;
StartUp.bEnableFPRF = config_cache.bEnableFPRF; StartUp.bEnableFPRF = config_cache.bEnableFPRF;
@ -180,5 +184,6 @@ void Stop()
StartUp.bFastDiscSpeed = config_cache.bFastDiscSpeed; StartUp.bFastDiscSpeed = config_cache.bFastDiscSpeed;
StartUp.bMergeBlocks = config_cache.bMergeBlocks; StartUp.bMergeBlocks = config_cache.bMergeBlocks;
} }
}
} // namespace } // namespace