Update README.md

* Install off the 1.0 tag not master
* Generally remove some headers to clean up the view on GitHub
* Link to contributors page as we now have more than 2
This commit is contained in:
Marc Di Luzio 2018-04-13 10:24:48 +01:00 committed by GitHub
parent 9bb3ebf34b
commit 9e2188c94e

View File

@ -22,8 +22,8 @@ pacman -S meson systemd ninja
# Fedora # Fedora
dnf install meson systemd-devel pkg-config dnf install meson systemd-devel pkg-config
git clone https://github.com/FeralInteractive/gamemode.git wget https://github.com/FeralInteractive/gamemode/archive/1.0.tar.gz && tar -xvf 1.0.tar.gz
cd gamemode cd gamemode-1.0
./bootstrap.sh ./bootstrap.sh
``` ```
@ -43,8 +43,8 @@ LD_PRELOAD=$LD_PRELOAD:/usr/\$LIB/libgamemodeauto.so %command%
### Developers ### Developers
You may want to build the request directly into an app. Note that none of these client methods force your users to have the daemon installed or running - they will safely no-op if the host is missing. You may want to build the request directly into an app. Note that none of these client methods force your users to have the daemon installed or running - they will safely no-op if the host is missing.
#### Explicit requests
```C ```C
// Manually with error checking
#include "gamemode_client.h" #include "gamemode_client.h"
if( gamemode_request_start() < 0 ) { if( gamemode_request_start() < 0 ) {
@ -56,9 +56,8 @@ You may want to build the request directly into an app. Note that none of these
gamemode_request_end(); // Not required, gamemoded can clean up after game exits gamemode_request_end(); // Not required, gamemoded can clean up after game exits
``` ```
#### Implicit requests
Simply use the header, but with `GAMEMODE_AUTO` defined.
```C ```C
// Automatically on program start and finish
#define GAMEMODE_AUTO #define GAMEMODE_AUTO
#include "gamemode_client.h" #include "gamemode_client.h"
``` ```
@ -68,32 +67,18 @@ Or, distribute `libgamemodeauto.so` and either add `-lgamemodeauto` to your link
--- ---
## Components ## Components
### Host **gamemoded** runs in the background, activates game mode on request, refcounts and also checks caller PID lifetime. Accepts `-d` (daemonize) and `-l` (log to syslog).
#### gamemoded
Runs in the background, activates game mode on request, refcounts and also checks caller PID lifetime.
Accepts `-d` (daemonize) and `-l` (log to syslog). **libgamemode** is an internal library used to dispatch requests to the daemon. Note: `libgamemode` should never be linked with directly.
#### libgamemode **libgamemodeauto** is a simple dynamic library that automatically requests game mode when loaded. Useful to `LD_PRELOAD` into any game as needed.
Internal library used to dispatch requests to the daemon.
Note: `libgamemode` should never be linked with directly. **gamemode\_client.h** is as single header lib that lets a game request game mode and handle errors.
### Client
#### libgamemodeauto
Simple dynamic library that automatically requests game mode when loaded.
Useful to `LD_PRELOAD` into any game as needed.
#### gamemode\_client.h
Single header lib that lets a game request game mode and handle errors.
--- ---
## Configuration ## Configuration
The daemon can currently be configured using a `gamemode.ini` file in `/usr/share/gamemode/`. It will load the file when starting up. 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.
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). The file parsing uses [inih](https://github.com/benhoyt/inih).
@ -115,8 +100,7 @@ clang-format -i $(find . -name '*.[ch]')
### Maintained by ### Maintained by
Marc Di Luzio (Feral Interactive) Marc Di Luzio (Feral Interactive)
### Contributions by See the [contributors](https://github.com/FeralInteractive/gamemode/graphs/contributors) section for an extended list of contributors.
Ikey Doherty (Solus Project), Minze Zwerver (Ysblokje)
--- ---
## License ## License