From 3100d13fc08cf04f831cd8167e98394c22389f59 Mon Sep 17 00:00:00 2001 From: Zephyron Date: Mon, 6 Jan 2025 14:06:41 +1000 Subject: discord: Improve game image handling and UI presentation Updates the Discord Rich Presence implementation to use Tinfoil's media server for game images and improves the overall presentation. Technical changes: - Switch to Tinfoil media server for game images - Add proper title ID handling and display - Improve error handling for image requests - Increase network timeout to 10 seconds - Cache URL to prevent string destruction - Update Discord client ID - Clean up code formatting and organization UI/UX improvements: - Remove title ID from game state display - Update default text to be more descriptive - Improve error logging for failed image fetches - Maintain image persistence between updates This change provides better game image support and a cleaner Discord presence display while improving reliability of the integration. --- src/citron/discord_impl.h | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'src/citron/discord_impl.h') diff --git a/src/citron/discord_impl.h b/src/citron/discord_impl.h index 04edbc5a1..738cb1f61 100644 --- a/src/citron/discord_impl.h +++ b/src/citron/discord_impl.h @@ -11,22 +11,22 @@ class System; namespace DiscordRPC { -class DiscordImpl : public DiscordInterface { -public: - DiscordImpl(Core::System& system_); - ~DiscordImpl() override; +class DiscordImpl: public DiscordInterface { +public: DiscordImpl(Core::System & system_); +~DiscordImpl() override; - void Pause() override; - void Update() override; +void Pause() override; +void Update() override; -private: - std::string GetGameString(const std::string& title); - void UpdateGameStatus(bool use_default); +private: void UpdateGameStatus(bool use_default); - std::string game_url{}; - std::string game_title{}; +std::string game_url {}; +std::string game_title {}; +std::string game_title_id {}; +std::string cached_url; - Core::System& system; +Core::System & system; +u64 program_id = 0; }; } // namespace DiscordRPC -- cgit v1.2.3