mirror of
https://github.com/yuzu-emu/discord-rpc
synced 2024-11-22 16:13:40 +00:00
Even simpler
This commit is contained in:
parent
6d7e279074
commit
cb34ca725f
1 changed files with 1 additions and 17 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
This is a simple example in C of using the rich presence API syncronously.
|
||||
This is a simple example in C of using the rich presence API syncronously, just sending presence.
|
||||
*/
|
||||
|
||||
#define _CRT_SECURE_NO_WARNINGS /* thanks Microsoft */
|
||||
|
@ -24,19 +24,6 @@ static void updateDiscordPresence() {
|
|||
Discord_UpdatePresence(&discordPresence);
|
||||
}
|
||||
|
||||
static void handleDiscordReady() {
|
||||
printf("Discord: ready\n");
|
||||
}
|
||||
|
||||
static void handleDiscordDisconnected() {
|
||||
printf("Discord: disconnected\n");
|
||||
}
|
||||
|
||||
static void handleDiscordWantsPresence() {
|
||||
printf("Discord: requests presence\n");
|
||||
updateDiscordPresence();
|
||||
}
|
||||
|
||||
static int prompt(char* line, size_t size) {
|
||||
int res;
|
||||
char* nl;
|
||||
|
@ -76,9 +63,6 @@ static void gameLoop() {
|
|||
int main() {
|
||||
DiscordEventHandlers handlers;
|
||||
memset(&handlers, 0, sizeof(handlers));
|
||||
handlers.ready = handleDiscordReady;
|
||||
handlers.disconnected = handleDiscordDisconnected;
|
||||
handlers.wantsPresence = handleDiscordWantsPresence;
|
||||
Discord_Initialize(APPLICATION_ID, &handlers);
|
||||
|
||||
gameLoop();
|
||||
|
|
Loading…
Reference in a new issue