diff --git a/src/discord/core.cpp b/src/discord/core.cpp index 217f24e4a..16a209700 100644 --- a/src/discord/core.cpp +++ b/src/discord/core.cpp @@ -146,6 +146,7 @@ void DiscordInstance::clear_activity(bool wait) { DiscordActivityWrapper::DiscordActivityWrapper(const std::string& details, discord::ActivityType type) { m_activity.SetDetails(details.c_str()); m_activity.SetType(type); + m_activity.SetSupportedPlatforms(constants::discord::supported_platforms); } diff --git a/src/discord/core.hpp b/src/discord/core.hpp index 55d917bf9..ef40bee78 100644 --- a/src/discord/core.hpp +++ b/src/discord/core.hpp @@ -37,6 +37,19 @@ namespace constants::discord { #error "Unsupported platform" #endif + +#if defined(__ANDROID__) + constexpr const std::uint32_t supported_platforms = DiscordActivitySupportedPlatformFlags_Android; +#elif defined(__CONSOLE__) +#error "Not supported" +#elif defined(FLATPAK_BUILD) || defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__NT__) \ + || defined(__APPLE__) || defined(__linux__) + constexpr const std::uint32_t supported_platforms = DiscordActivitySupportedPlatformFlags_Desktop; +#else +#error "Unsupported platform" +#endif + + // manually synchronized to https://discord.com/developers/applications/1220147916371394650/rich-presence/assets enum class ArtAsset { logo };