summaryrefslogtreecommitdiff
path: root/Source/Core/DolphinNoGUI/MainNoGUI.cpp
diff options
context:
space:
mode:
authorDavid Korth <gerbilsoft@gerbilsoft.com>2019-02-13 21:31:31 -0500
committerLéo Lam <leo@leolam.fr>2019-05-24 14:12:48 +0200
commit8417c78b7a0015ae8252fe0841c9e98e38f5745c (patch)
tree762ca1f5c78b11f014ad6aaa68f2a4e180e08d79 /Source/Core/DolphinNoGUI/MainNoGUI.cpp
parent3ab06dcd02ea6040c2620a8ce8be144c65534c2d (diff)
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().
Diffstat (limited to 'Source/Core/DolphinNoGUI/MainNoGUI.cpp')
-rw-r--r--Source/Core/DolphinNoGUI/MainNoGUI.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/Source/Core/DolphinNoGUI/MainNoGUI.cpp b/Source/Core/DolphinNoGUI/MainNoGUI.cpp
index e4096d8501..1b35ac8809 100644
--- a/Source/Core/DolphinNoGUI/MainNoGUI.cpp
+++ b/Source/Core/DolphinNoGUI/MainNoGUI.cpp
@@ -105,6 +105,13 @@ void Host_UpdateProgressDialog(const char* caption, int position, int total)
{
}
+void Host_TitleChanged()
+{
+#ifdef USE_DISCORD_PRESENCE
+ Discord::UpdateDiscordPresence();
+#endif
+}
+
static std::unique_ptr<Platform> GetPlatform(const optparse::Values& options)
{
std::string platform_name = static_cast<const char*>(options.get("platform"));