mirror of
https://github.com/libretro/ppsspp.git
synced 2025-02-17 07:31:01 +00:00
Discord: Attempt to explicitly cleanup on exit.
This commit is contained in:
parent
6bd6b86c05
commit
c96748f0e2
@ -134,3 +134,12 @@ void Discord::SetPresenceMenu() {
|
||||
Discord_UpdatePresence(&discordPresence);
|
||||
#endif
|
||||
}
|
||||
|
||||
void Discord::ClearPresence() {
|
||||
if (!IsEnabled() || !initialized_)
|
||||
return;
|
||||
|
||||
#ifdef ENABLE_DISCORD
|
||||
Discord_ClearPresence();
|
||||
#endif
|
||||
}
|
||||
|
@ -17,6 +17,7 @@ public:
|
||||
|
||||
void SetPresenceGame(const char *gameTitle);
|
||||
void SetPresenceMenu();
|
||||
void ClearPresence();
|
||||
|
||||
private:
|
||||
void Init();
|
||||
|
@ -346,7 +346,11 @@ EmuScreen::~EmuScreen() {
|
||||
startDumping = false;
|
||||
}
|
||||
#endif
|
||||
g_Discord.SetPresenceMenu();
|
||||
|
||||
if (GetUIState() == UISTATE_EXIT)
|
||||
g_Discord.ClearPresence();
|
||||
else
|
||||
g_Discord.SetPresenceMenu();
|
||||
}
|
||||
|
||||
void EmuScreen::dialogFinished(const Screen *dialog, DialogResult result) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user