mirror of
https://github.com/libretro/RetroArch
synced 2025-01-30 21:32:45 +00:00
Add discord_is_inited
This commit is contained in:
parent
31e7894539
commit
1fb57857ea
12
retroarch.c
12
retroarch.c
@ -201,6 +201,9 @@ static retro_bits_t has_set_libretro_device;
|
||||
|
||||
static bool has_set_core = false;
|
||||
static bool has_set_username = false;
|
||||
#ifdef HAVE_DISCORD
|
||||
static bool discord_is_inited = false;
|
||||
#endif
|
||||
static bool rarch_is_inited = false;
|
||||
static bool rarch_error_on_init = false;
|
||||
static bool rarch_block_config_read = false;
|
||||
@ -1379,7 +1382,12 @@ bool retroarch_main_init(int argc, char *argv[])
|
||||
rarch_is_inited = true;
|
||||
|
||||
#ifdef HAVE_DISCORD
|
||||
{
|
||||
discord_init();
|
||||
discord_is_inited = true;
|
||||
}
|
||||
|
||||
if (discord_is_inited)
|
||||
discord_update(DISCORD_PRESENCE_MENU);
|
||||
#endif
|
||||
|
||||
@ -2331,7 +2339,9 @@ bool retroarch_main_quit(void)
|
||||
rarch_menu_running_finished();
|
||||
|
||||
#ifdef HAVE_DISCORD
|
||||
if (discord_is_inited)
|
||||
discord_shutdown();
|
||||
discord_is_inited = false;
|
||||
#endif
|
||||
|
||||
return true;
|
||||
@ -3337,7 +3347,9 @@ int runloop_iterate(unsigned *sleep_ms)
|
||||
if (runloop_check_cheevos())
|
||||
cheevos_test();
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_DISCORD
|
||||
if (discord_is_inited)
|
||||
discord_update(DISCORD_PRESENCE_GAME);
|
||||
#endif
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user