more fixes for cfg file
git-svn-id: https://clonekeenplus.svn.sourceforge.net/svnroot/clonekeenplus/cgenius/trunk@156 4df4b0f3-56ce-47cb-b001-ed939b7d65a6
This commit is contained in:
@@ -219,10 +219,12 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
}
|
||||
|
||||
Settings.saveGameCfg(CKP.Option);
|
||||
|
||||
cleanupResources(&CKP);
|
||||
|
||||
Settings.saveDrvCfg();
|
||||
|
||||
|
||||
printf("Thank you very much for playing this wonderful game!");
|
||||
|
||||
return 0;
|
||||
|
||||
@@ -137,12 +137,13 @@ void CSettings::loadDefaultGameCfg(stOption *Option)
|
||||
|
||||
short CSettings::loadGameCfg(stOption *Option)
|
||||
{
|
||||
short retval = 0;
|
||||
int i;
|
||||
CParser Parser;
|
||||
|
||||
if(!Parser.loadParseFile())
|
||||
if(!Parser.loadParseFile()) {
|
||||
loadDefaultGameCfg(Option);
|
||||
return 1;
|
||||
}
|
||||
|
||||
for (i = 0; i < NUM_OPTIONS; i++)
|
||||
{
|
||||
@@ -150,11 +151,10 @@ short CSettings::loadGameCfg(stOption *Option)
|
||||
if(Option[i].value == -1)
|
||||
{
|
||||
loadDefaultGameCfg(Option);
|
||||
break;
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
return retval;
|
||||
|
||||
g_pLogFile->ftextOut("<br>Your personal settings were loaded successfully...<br>");
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user