From df1ae19742bf7ef1bd1ed3d5c51d5329c2cf16ea Mon Sep 17 00:00:00 2001 From: Zephyron Date: Tue, 4 Feb 2025 20:28:16 +1000 Subject: [PATCH] discord: Increase game icon resolution to 256x256 Update the tinfoil.media URL requests to fetch game icons at 256x256 resolution instead of 128x128, providing higher quality game icons in Discord Rich Presence. --- src/citron/discord_impl.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/citron/discord_impl.cpp b/src/citron/discord_impl.cpp index 518a1327c..35a4d03f0 100644 --- a/src/citron/discord_impl.cpp +++ b/src/citron/discord_impl.cpp @@ -1,4 +1,5 @@ // SPDX-FileCopyrightText: 2018 Citra Emulator Project +// SPDX-FileCopyrightText: 2025 citron Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later #include @@ -58,7 +59,7 @@ DiscordRichPresence presence {}; // Store the URL string to prevent it from being destroyed if (!game_title_id.empty()) { -game_url = fmt::format("{}{}/128/128", tinfoil_base_url, game_title_id); +game_url = fmt::format("{}{}/256/256", tinfoil_base_url, game_title_id); // Make sure the string stays alive for the duration of the presence cached_url = game_url; presence.largeImageKey = cached_url.c_str(); @@ -90,7 +91,7 @@ fmt::print("Title ID: {}\n", game_title_id); QNetworkAccessManager manager; QNetworkRequest request; request.setUrl(QUrl(QString::fromStdString( -fmt::format("https://tinfoil.media/ti/{}/128/128", game_title_id)))); +fmt::format("https://tinfoil.media/ti/{}/256/256", game_title_id)))); request.setTransferTimeout(10000); QNetworkReply * reply = manager.head(request); QEventLoop request_event_loop;