Page MenuHomeWildfire Games

Change "SYSTEM" config namespace priority

Authored by wraitii on May 28 2019, 11:03 AM.


Group Reviewers
Restricted Owners Package(Owns No Changed Paths)

The CFG_SYSTEM namespace is above default but below every other namespace, including CFG_USER. It was intended to be for the "local.cfg" config file, which existed to let devs make changes without committing them to svn.
This is a bit of a weird purpose, because:

  • user.cfg exists
  • one can just be careful

Furthermore, the CFG_SYSTEM name implies somme connection with the user's system, when there is none.
Because of this, HWDetect and other "system capabilities" checks need to change settings awkwardly to override user settings-but-not-command-line settings. This makes rendering options extremely awkward to navigate.

If instead we make CFG_SYSTEM override all config namespace but the command line, then we can easily use this for hardware detection condor, while still letting the user override from the command line.

This lets us clean up HWDetect and remove global variables in D1931.

Test Plan
  1. Agree with the above.
  2. Compile and test.

Event Timeline

wraitii created this revision.May 28 2019, 11:03 AM
Owners added a subscriber: Restricted Owners Package.May 28 2019, 11:03 AM

Build failure - The Moirai have given mortals hearts that can endure.

Link to build:

wraitii updated this revision to Diff 9606.Sep 2 2019, 9:32 PM
wraitii retitled this revision from Change "SYSTEM" config namespace priority, refactor graphics options override to Change "SYSTEM" config namespace priority.
wraitii edited the summary of this revision. (Show Details)

Only do the rename in this diff. See D1931.

Vulcan added a comment.Sep 2 2019, 9:35 PM

Build failure - The Moirai have given mortals hearts that can endure.

Link to build:

Vulcan added a comment.Sep 2 2019, 9:49 PM

Successful build - Chance fights ever on the side of the prudent.

Linter detected issues:
Executing section Source...

|  53| class·CConfigDB·:·public·Singleton<CConfigDB>
|    | [MAJOR] CPPCheckBear (syntaxError):
|    | Code 'classCConfigDB:' is invalid C code. Use --std or --language to configure the language.
Executing section JS...
Executing section cli...

Link to build:

wraitii abandoned this revision.Jun 1 2020, 5:13 PM

Effectively merged in D1931