mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-24 16:39:43 +00:00
Merge pull request #11657 from Jamiras/discord_fix
fix discord rich presence
This commit is contained in:
commit
22042f2351
2
deps/discord-rpc/include/discord_rpc.h
vendored
2
deps/discord-rpc/include/discord_rpc.h
vendored
@ -57,9 +57,7 @@ void Discord_RunCallbacks(void);
|
||||
|
||||
/* If you disable the lib starting its own I/O thread,
|
||||
* you'll need to call this from your own */
|
||||
#ifdef DISCORD_DISABLE_IO_THREAD
|
||||
void Discord_UpdateConnection(void);
|
||||
#endif
|
||||
|
||||
void Discord_UpdatePresence(const DiscordRichPresence* presence);
|
||||
void Discord_ClearPresence(void);
|
||||
|
@ -6282,6 +6282,7 @@ void discord_update(enum discord_presence presence)
|
||||
#endif
|
||||
|
||||
Discord_UpdatePresence(&discord_st->presence);
|
||||
Discord_UpdateConnection();
|
||||
discord_st->status = presence;
|
||||
}
|
||||
|
||||
@ -6303,6 +6304,7 @@ static void discord_init(
|
||||
handlers.joinRequest = handle_discord_join_request;
|
||||
|
||||
Discord_Initialize(discord_app_id, &handlers, 0, NULL);
|
||||
Discord_UpdateConnection();
|
||||
|
||||
#ifdef _WIN32
|
||||
fill_pathname_application_path(full_path, sizeof(full_path));
|
||||
@ -6320,6 +6322,7 @@ static void discord_init(
|
||||
#endif
|
||||
RARCH_LOG("[DISCORD]: Registering startup command: %s\n", command);
|
||||
Discord_Register(discord_app_id, command);
|
||||
Discord_UpdateConnection();
|
||||
discord_st->ready = true;
|
||||
}
|
||||
#endif
|
||||
@ -35940,6 +35943,7 @@ bool retroarch_main_quit(void)
|
||||
if (discord_st->ready)
|
||||
{
|
||||
Discord_ClearPresence();
|
||||
Discord_UpdateConnection();
|
||||
Discord_Shutdown();
|
||||
discord_st->ready = false;
|
||||
}
|
||||
@ -37359,7 +37363,10 @@ int runloop_iterate(void)
|
||||
discord_state_t *discord_st = &p_rarch->discord_st;
|
||||
|
||||
if (discord_is_inited)
|
||||
{
|
||||
Discord_RunCallbacks();
|
||||
Discord_UpdateConnection();
|
||||
}
|
||||
#endif
|
||||
|
||||
if (p_rarch->runloop_frame_time.callback)
|
||||
|
Loading…
Reference in New Issue
Block a user