mirror of
https://github.com/FeralInteractive/gamemode.git
synced 2025-06-06 23:57:22 +02:00
gamemode: Add a value clamping helper
Signed-off-by: Kai Krakow <kai@kaishome.de>
This commit is contained in:
parent
c9031e4a75
commit
a91a2e7739
@ -44,6 +44,7 @@ POSSIBILITY OF SUCH DAMAGE.
|
||||
#include <signal.h>
|
||||
#include <stdatomic.h>
|
||||
#include <string.h>
|
||||
#include <sys/param.h>
|
||||
#include <sys/resource.h>
|
||||
#include <sys/sysinfo.h>
|
||||
#include <systemd/sd-daemon.h>
|
||||
@ -59,6 +60,10 @@ POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#define NICE_DEFAULT_PRIORITY -4
|
||||
|
||||
/* Value clamping helper.
|
||||
*/
|
||||
#define CLAMP(lbound, ubound, value) MIN(MIN(lbound, ubound), MAX(MAX(lbound, ubound), value))
|
||||
|
||||
/**
|
||||
* The GameModeClient encapsulates the remote connection, providing a list
|
||||
* form to contain the pid and credentials.
|
||||
|
Loading…
x
Reference in New Issue
Block a user