Add config file parsing

Checks for a gamemode.ini in /usr/share/gamemode/ (or in the cwd for debugging)

	Currently allows for blacklisting and whitelisting clients based on rudimentary needle-haystack executable name checks

	See the example/gamemode.ini file for expected syntax

	Using the BSD licensed inih library (with additional meson.build file)
This commit is contained in:
Marc Di Luzio
2018-03-23 13:30:25 +00:00
parent 142246366f
commit 759cbc3c40
10 changed files with 388 additions and 0 deletions

View File

@@ -101,6 +101,16 @@ Add `-lgamemodeauto` to linker arguments and distribute `libgamemodeauto.so` wit
#### Option 3: Distribute and script
Distribute `libgamemodeauto.so` with the game and add to LD\_PRELOAD in a launch script
---
## Configuration
The daemon can currently be configured using a `gamemode.ini` file in `/usr/share/gamemode/`. It will load the file when starting up.
An example of what the file could look like is found in the `example` directory.
The file parsing uses [inih](https://github.com/benhoyt/inih).
---
## Pull Requests
Pull requests must match with the coding style found in the `.clang-format` file