* README: Add new gamemode extension link
Since the old extension is no longer maintained by the original author and has stopped working in the latest releases of GNOME, I recommend including my extension in the README.
glibc provides a nonstandard basename implementation,
this can be overriden and posix basename can be used
by includeing libgen.h, however musl only has posix
basename, and must always include libgen.h
In this particular case, it doesn't appear that using
the posix version of basename will cause any issues,
as it is simply being used to match a hardcoded config
file name.
Systemd commit [bf1b9ae487b65b1cb1639b222724fab95e508cf5](bf1b9ae487) (present in Systemd v254 and later) effectively broke gamemodelist as the process map for the `systemd --user` process became unreadable. After this change gamemodelist would exit with an error like the following:
```
awk: fatal: cannot open file `/proc/2281/maps' for reading: Permission denied
```
To work around this let's add a hook to the awk statement to skip any files that can't be read.
ClosesFeralInteractive/gamemode#456
Fixes the following build failure:
In file included from ../common/common-cpu.c:32:
../common/common-cpu.h:44:9: error: unknown type name 'cpu_set_t'
44 | cpu_set_t *online;
| ^~~~~~~~~
../common/common-cpu.h:45:9: error: unknown type name 'cpu_set_t'
45 | cpu_set_t *to_keep;
| ^~~~~~~~~
Signed-off-by: Kostadin Shishmanov <kocelfc@tutanota.com>
Based on the change originally made by @joelsgp in PR #417, but there
were issues with the original commit message:
- Used an emoji which may cause rendering issues in CLI tools
- Mentioned Bitcoin mining which is inaccurate and contained
unnecessary censorship
This was spotted thanks to clang-format reordering the includes.
Even with the new config, it will include the header file for the
current source file first. Nevertheless, it is best to always include
header files where they are needed.
This avoids confusion with the default configuration value being
`gpu_device=0` (as commented out in the `gamemode.ini` example),
but the actual default value being `-1`.
The alternative is to document this behavior and set the commented
out value to `-1`, but this makes the setup procedure more complex.
The new default behavior suits the 90% use case where there's
only one dedicated GPU available.