Save good name to cfg file when saving game settings

This commit is contained in:
zilmar 2012-11-29 22:24:38 +11:00
parent c3b743adf1
commit d60f2f89f4
2 changed files with 10 additions and 1 deletions

View File

@ -211,7 +211,7 @@ void CSettingTypeGame::Save ( int Index, const stdstr & Value )
void CSettingTypeGame::Save ( int Index, const char * Value )
{
if (m_EraseDefaults)
if (m_EraseDefaults && m_DefaultSetting != Rdb_GoodName)
{
stdstr szDefault;
CSettingTypeGame::LoadDefault(Index,szDefault);

View File

@ -243,6 +243,15 @@ void CSettingConfig::ApplySettings( bool UpdateScreen )
::EnableWindow(GetDlgItem(IDC_RESET_PAGE), m_CurrentPage->EnableReset());
}
if (!g_Settings->LoadString(Game_IniKey).empty())
{
stdstr GoodName = g_Settings->LoadString(Rdb_GoodName);
if (GoodName.length() > 0)
{
g_Settings->SaveString(Game_GoodName,GoodName);
}
}
CSettingTypeApplication::Flush();
}