From 74b0178b7b4d672c7f6b317102b0ecd26f1ea033 Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Sat, 12 Jul 2025 21:49:15 +0800 Subject: Rich Presence support using Discord Social SDK Download DiscordSocialSdk-1.4.9649.zip https://discord.com/developers/applications/1393451183741599796/social-sdk/downloads to your ~/Downloads folder. Add -DUSE_DISCORD:BOOL=ON to your cmake line. The authorisation is triggered by selecting Help > Discord Social. It seems that the user will need to do this every time they want Rich Presence support on the viewer while using Discord. The Discord app is still set to be a public client in the OAuth2 tab, I'm going to try to make it work with the app set to be a confidential client, next. All Discord-related code are contained within one file, llstartup.cpp, and other classes access it through some opaque layer, static functions, otherwise we'd get these "duplicate symbol" linking errors. --- indra/newview/llappviewer.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'indra/newview/llappviewer.cpp') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index d9596164eb..419d2cb842 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -1348,6 +1348,10 @@ bool LLAppViewer::doFrame() U64 fpsLimitSleepFor = 0; TimePoint fpsLimitFrameStartTime = std::chrono::steady_clock::now(); +#ifdef LL_DISCORD + LLStartUp::runDiscordCallbacks(); +#endif + LL_RECORD_BLOCK_TIME(FTM_FRAME); { // and now adjust the visuals from previous frame. -- cgit v1.2.3