diff options
| author | lizzie <lizzie@eden-emu.dev> | 2026-08-28 03:46:36 +0200 |
|---|---|---|
| committer | crueter <crueter@eden-emu.dev> | 2026-08-28 03:46:36 +0200 |
| commit | 119291dc77fbe8e4a23eaafa8420c1c8577d1b59 (patch) | |
| tree | 1523ad097e714d5d8510d25ed45f0039d1388e54 /src | |
| parent | f7dbff2157ebf661f2bbf2eafc96caf4edc5937b (diff) | |
[qt_common/discord] fix boxart not being used (#4275)
Signed-off-by: lizzie <lizzie@eden-emu.dev>
- [x] I have read and followed the [Contribution Guidelines](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/CONTRIBUTING.md#code-contributions).
- [x] I have read and followed the [AI Policy](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/docs/policies/AI.md)
- [x] I have read and followed the [Coding Guidelines](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/docs/policies/Coding.md) to the best of my ability.
-------------------
issue was first reported here
https://github.com/eden-emulator/Issue-Reports/issues/607
tl;dr wrong boolean, now boxarts should work
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4275
Reviewed-by: Maufeat <sahyno1996@gmail.com>
Reviewed-by: MaranBr <maranbr@eden-emu.dev>
Diffstat (limited to 'src')
| -rw-r--r-- | src/qt_common/discord/discord_impl.cpp | 8 | ||||
| -rw-r--r-- | src/qt_common/discord/discord_impl.h | 6 |
2 files changed, 6 insertions, 8 deletions
diff --git a/src/qt_common/discord/discord_impl.cpp b/src/qt_common/discord/discord_impl.cpp index c1cb5319dc..666b490347 100644 --- a/src/qt_common/discord/discord_impl.cpp +++ b/src/qt_common/discord/discord_impl.cpp @@ -74,8 +74,8 @@ static constexpr char DEFAULT_DISCORD_IMAGE[] = "https://git.eden-emu.dev/eden-emu/eden/raw/branch/master/dist/qt_themes/default/icons/256x256/" "eden.png"; -void DiscordImpl::UpdateGameStatus(bool use_default) { - const std::string url = use_default ? std::string{DEFAULT_DISCORD_IMAGE} : game_url; +void DiscordImpl::UpdateGameStatus(std::string_view game_url, bool has_boxart) { + const std::string url = std::string{has_boxart ? game_url : DEFAULT_DISCORD_IMAGE}; s64 start_time = std::chrono::duration_cast<std::chrono::seconds>( std::chrono::system_clock::now().time_since_epoch()) .count(); @@ -98,7 +98,7 @@ void DiscordImpl::Update() { // Used to format Icon URL for yuzu website game compatibility page std::string icon_name = GetGameString(game_title); - game_url = fmt::format( + auto const game_url = fmt::format( "https://raw.githubusercontent.com/eden-emulator/boxart/refs/heads/master/img/{}.png", icon_name); @@ -117,7 +117,7 @@ void DiscordImpl::Update() { }; auto res = client.send(request); - UpdateGameStatus(res && res->status == 200); + UpdateGameStatus(game_url, res && res->status == 200); return; } diff --git a/src/qt_common/discord/discord_impl.h b/src/qt_common/discord/discord_impl.h index 919717664c..602e431482 100644 --- a/src/qt_common/discord/discord_impl.h +++ b/src/qt_common/discord/discord_impl.h @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project +// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project // SPDX-License-Identifier: GPL-3.0-or-later // SPDX-FileCopyrightText: 2018 Citra Emulator Project @@ -26,11 +26,9 @@ public: private: std::string GetGameString(const std::string& title); - void UpdateGameStatus(bool use_default); + void UpdateGameStatus(std::string_view game_url, bool use_default); - std::string game_url{}; std::string game_title{}; - Core::System& system; }; |
