mirror of
https://github.com/yuzu-emu/discord-rpc
synced 2024-11-26 00:07:58 +00:00
register join and spectate handlers too
This commit is contained in:
parent
059ab337c8
commit
1b7f782f57
1 changed files with 13 additions and 0 deletions
|
@ -50,6 +50,16 @@ static void handleDiscordError(int errcode, const char* message)
|
|||
printf("\nDiscord: error (%d: %s)\n", errcode, message);
|
||||
}
|
||||
|
||||
static void handleDiscordJoin(const char* secret)
|
||||
{
|
||||
printf("\nDiscord: join (%s)\n", secret);
|
||||
}
|
||||
|
||||
static void handleDiscordSpectate(const char* secret)
|
||||
{
|
||||
printf("\nDiscord: spectate (%s)\n", secret);
|
||||
}
|
||||
|
||||
static int prompt(char* line, size_t size)
|
||||
{
|
||||
int res;
|
||||
|
@ -108,6 +118,9 @@ int main(int argc, char* argv[])
|
|||
handlers.ready = handleDiscordReady;
|
||||
handlers.disconnected = handleDiscordDisconnected;
|
||||
handlers.errored = handleDiscordError;
|
||||
handlers.joinGame = handleDiscordJoin;
|
||||
handlers.spectateGame = handleDiscordSpectate;
|
||||
|
||||
Discord_Initialize(APPLICATION_ID, &handlers, 1);
|
||||
|
||||
gameLoop();
|
||||
|
|
Loading…
Reference in a new issue