Save a valid config at first start..!
This commit is contained in:
parent
36b315c56e
commit
bef2511ac4
|
@ -178,9 +178,6 @@ static void loadConfig(void)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
text = readFile("data/app/config.json");
|
text = readFile("data/app/config.json");
|
||||||
|
|
||||||
/* so that the player doesn't get confused */
|
|
||||||
saveConfig();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
root = cJSON_Parse(text);
|
root = cJSON_Parse(text);
|
||||||
|
@ -194,6 +191,9 @@ static void loadConfig(void)
|
||||||
|
|
||||||
cJSON_Delete(root);
|
cJSON_Delete(root);
|
||||||
free(text);
|
free(text);
|
||||||
|
|
||||||
|
/* so that the player doesn't get confused if this is a new game */
|
||||||
|
saveConfig();
|
||||||
}
|
}
|
||||||
|
|
||||||
void saveConfig(void)
|
void saveConfig(void)
|
||||||
|
|
Loading…
Reference in New Issue