mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-05-02 09:18:36 +00:00
Update Discord rich presence when the title changes
This allows us to update the rich presence description if a channel is launched from the Wii Menu. It also handles other PPC title launches, e.g. Smash Bros. Masterpieces. Host.h: Added Host_TitleChanged(). DolphinNoGUI/MainNoGUI.cpp: Implemented Host_TitleChanged(). DolphinQt/Host.cpp: Implemented Host_TitleChanged(). Android/jni/MainAndroid.cpp: Stubbed Host_TitleChanged(). DSPTool/StubHost.cpp: Stubbed Host_TitleChanged(). UnitTests/StubHost.cpp: Stubbed Host_TitleChanged().
This commit is contained in:
parent
3ab06dcd02
commit
8417c78b7a
7 changed files with 31 additions and 0 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue