Skip to content

Conversation

gicmo
Copy link
Contributor

@gicmo gicmo commented Jul 14, 2019

Record the timestamp a client was created and who requested it and expose them as Timestamp and Requester properties of the com.feralinteractive.GameMode.Game interface. I am thinking of creating a small gamemodeclt command line tool to show the current status, and list all the clients and all the information we got about them. Maybe also a gamemodectl -p <pid> to request GameMode on behalf of pid. What do you guys think?

gicmo added 5 commits July 14, 2019 22:17
We show the status for examples & daemon, also show it for 'util'.
Record the time a client was created, i.e. registered, in the
GameModeClient struct and add a getter for it.
Expose the timestamp that a client was created as 'Timestamp'
property of the com.feralinteractive.GameMode.Game interface.
Record the requester process id in the GameModeClient struct and
add a getter for it.
Expose the requeter process identifier as 'Requester' property
of the com.feralinteractive.GameMode.Game interface.
@@ -69,6 +70,11 @@ pid_t game_mode_client_get_pid(GameModeClient *client);
*/
const char *game_mode_client_get_executable(GameModeClient *client);

/**
* The path to the executable of client.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wrong comment.

@@ -714,6 +726,15 @@ const char *game_mode_client_get_executable(GameModeClient *client)
return client->executable;
}

/**
* The path to the executable of client.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wrong comment.

@aejsmith
Copy link
Contributor

Just a couple of incorrect function comments, otherwise looks good to me. I'll fix these up and merge.

As for gamemodectl, I like the idea. Note that you can already use gamemoded to request game mode, either by making the request from that process and waiting until interrupted, or on behalf of another process. However, if a separate gamemodectl tool is added, I think that'd be a better place for that functionality to live.

@aejsmith aejsmith closed this Jul 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants