diff options
author | Zephyron <zephyron@citron-emu.org> | 2025-01-06 14:06:41 +1000 |
---|---|---|
committer | Zephyron <zephyron@citron-emu.org> | 2025-01-06 14:06:41 +1000 |
commit | 3100d13fc08cf04f831cd8167e98394c22389f59 (patch) | |
tree | 6758b33209bfd693b89c0ccb1af6df3ad51ba024 /src/citron/discord_impl.h | |
parent | 08f1ed40116d859ff680dcd733dac5e3d1abe386 (diff) |
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.
Diffstat (limited to 'src/citron/discord_impl.h')
-rw-r--r-- | src/citron/discord_impl.h | 24 |
1 files changed, 12 insertions, 12 deletions
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 |