Sections in acsetup.cfg

Started by Radiant, Wed 05/10/2016 12:43:04

Previous topic - Next topic

Radiant

I'm curious, how does acsetup.cfg deal with a layout like this,

Code: ags
[sound]
some_stuff=1
[misc]
some_other_stuff=2
[sound]
final_stuff=3


In other words, two sections 'sound'. Does that work? Do the section headers matter? Should I merge them?

Crimson Wizard

#1
Not sure about previous versions, latest versions should merge them on reading.
...I think I tested that out before, but I can test again just in case.

OTOH, current engine actually supports multiple config files, read-only one in game installation folder (as default, and for backwards compatibility), and writeable in user "saved games" folder (this currently is Windows setup, other ports may have only one file in practice). Their contents get merged without problem, second config values overriding previous one, but not erasing options that do not exist in second.

Radiant

Quote from: Crimson Wizard on Wed 05/10/2016 13:02:41
Not sure about previous versions, latest versions should merge them on reading.
...I think I tested that out before, but I can test again just in case.

Can you tell me as of which version it merges them?

Crimson Wizard

Quote from: Radiant on Wed 05/10/2016 13:05:50
Can you tell me as of which version it merges them?

According to git history, the new ini reading code was added since 3.3.5.0 and 3.4.0.7 (which was first 3.4 alpha that included 3.3.5 changes).

SMF spam blocked by CleanTalk