mirror of
https://github.com/isledecomp/isle-portable.git
synced 2026-01-10 18:21:14 +00:00
- Set defaults if ini exists, but empty. (#730)
- Create a new dictionary object, not use null object. Co-authored-by: SnepOMatic (Rhew) <github@rhew.co.uk>
This commit is contained in:
parent
deafe6c384
commit
bad285500a
@ -1074,7 +1074,7 @@ bool IsleApp::LoadConfig()
|
||||
|
||||
// [library:config]
|
||||
// Load sane defaults if dictionary failed to load
|
||||
if (!dict) {
|
||||
if (!dict || dict->n == 0) {
|
||||
if (m_iniPath) {
|
||||
SDL_Log("Invalid config path '%s'", m_iniPath);
|
||||
return false;
|
||||
@ -1094,7 +1094,7 @@ bool IsleApp::LoadConfig()
|
||||
}
|
||||
|
||||
char buf[32];
|
||||
dict = iniparser_load(iniConfig.GetData());
|
||||
dict = dictionary_new(0);
|
||||
iniparser_set(dict, "isle", NULL);
|
||||
|
||||
iniparser_set(dict, "isle:diskpath", SDL_GetBasePath());
|
||||
|
||||
Loading…
Reference in New Issue
Block a user