summaryrefslogtreecommitdiff
path: root/Source/Core/DolphinNoGUI/MainNoGUI.cpp
diff options
context:
space:
mode:
authorScott Mansell <phiren@gmail.com>2022-08-08 08:11:42 +1200
committerGitHub <noreply@github.com>2022-08-08 08:11:42 +1200
commit4c2d707538e83c4f0663018f0df17a68f4b433f1 (patch)
treed499207a00ed196ac5d52b309ad004354dfe735e /Source/Core/DolphinNoGUI/MainNoGUI.cpp
parentd69f38f415ffd8348f4b8617b2796c5ac554b61a (diff)
parentf9e39cf2004295fa3129646880690424a796e676 (diff)
Merge pull request #10940 from InvoxiPlayGames/ipc-discord
Add Discord presence ioctlv to /dev/dolphin
Diffstat (limited to 'Source/Core/DolphinNoGUI/MainNoGUI.cpp')
-rw-r--r--Source/Core/DolphinNoGUI/MainNoGUI.cpp24
1 files changed, 24 insertions, 0 deletions
diff --git a/Source/Core/DolphinNoGUI/MainNoGUI.cpp b/Source/Core/DolphinNoGUI/MainNoGUI.cpp
index 03ea30ec17..11bbf55da1 100644
--- a/Source/Core/DolphinNoGUI/MainNoGUI.cpp
+++ b/Source/Core/DolphinNoGUI/MainNoGUI.cpp
@@ -122,6 +122,30 @@ void Host_TitleChanged()
#endif
}
+void Host_UpdateDiscordClientID(const std::string& client_id)
+{
+#ifdef USE_DISCORD_PRESENCE
+ Discord::UpdateClientID(client_id);
+#endif
+}
+
+bool Host_UpdateDiscordPresenceRaw(const std::string& details, const std::string& state,
+ const std::string& large_image_key,
+ const std::string& large_image_text,
+ const std::string& small_image_key,
+ const std::string& small_image_text,
+ const int64_t start_timestamp, const int64_t end_timestamp,
+ const int party_size, const int party_max)
+{
+#ifdef USE_DISCORD_PRESENCE
+ return Discord::UpdateDiscordPresenceRaw(details, state, large_image_key, large_image_text,
+ small_image_key, small_image_text, start_timestamp,
+ end_timestamp, party_size, party_max);
+#else
+ return false;
+#endif
+}
+
std::unique_ptr<GBAHostInterface> Host_CreateGBAHost(std::weak_ptr<HW::GBA::Core> core)
{
return nullptr;