Merge pull request #7801 from GerbilSoft/feature/Discord-PPCTitleChanged

Update Discord rich presence when the PPC title changes
This commit is contained in:
Léo Lam
2019-05-24 14:30:52 +02:00
committed by GitHub
7 changed files with 31 additions and 0 deletions

View File

@ -17,6 +17,7 @@
#include "Core/Core.h"
#include "Core/Debugger/PPCDebugInterface.h"
#include "Core/Host.h"
#include "Core/NetPlayProto.h"
#include "Core/PowerPC/PowerPC.h"
#include "DolphinQt/QtUtils/QueueOnObject.h"
@ -24,6 +25,8 @@
#include "InputCommon/ControllerInterface/ControllerInterface.h"
#include "UICommon/DiscordPresence.h"
#include "VideoCommon/RenderBase.h"
#include "VideoCommon/VideoConfig.h"
@ -164,3 +167,12 @@ bool Host_UIBlocksControllerState()
void Host_RefreshDSPDebuggerWindow()
{
}
void Host_TitleChanged()
{
#ifdef USE_DISCORD_PRESENCE
// TODO: Not sure if the NetPlay check is needed.
if (!NetPlay::IsNetPlayRunning())
Discord::UpdateDiscordPresence();
#endif
}