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

9
example/gamemode.ini Normal file
View File

@ -0,0 +1,9 @@
[filter]
; Gamemode will always reject anything in the blacklist
blacklist=HalfLife3
glxgears
steam
; If "whitelist" entry has a value(s)
; gamemode will reject anything not in the whitelist
;whitelist=RiseOfTheTombRaider