mirror of
https://github.com/FeralInteractive/gamemode.git
synced 2025-11-17 06:14:10 +01:00
add RestartGamemode command
This allows gamemode to leave the context and then enter it again, which re-applies all system optimizations. It is useful in cases where another program (like TLP) may override gamemode's optimizations. This is exposed to users by the -R or --restart flags to gamemoded.
This commit is contained in:
committed by
afayaz-feral
parent
af07e169d5
commit
ce6fe122f3
@@ -155,6 +155,16 @@ int game_mode_context_unregister(GameModeContext *self, pid_t pid, pid_t request
|
||||
*/
|
||||
int game_mode_context_query_status(GameModeContext *self, pid_t pid, pid_t requester);
|
||||
|
||||
/**
|
||||
* Restart gamemode if it is running
|
||||
*
|
||||
* @param pid Process ID for the remote client
|
||||
* @returns 0 if gamemode was restarted
|
||||
* 1 if gamemode was already deactivated
|
||||
* -2 if this request was rejected
|
||||
*/
|
||||
int game_mode_context_restart(GameModeContext *self, pid_t pid, pid_t requester);
|
||||
|
||||
/**
|
||||
* Query the config of a gamemode context
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user