mirror of
https://git.citron-emu.org/Citron/Citron.git
synced 2025-02-07 16:56:21 +01:00
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.
This commit is contained in:
parent
4cc01f6c71
commit
df1ae19742
1 changed files with 3 additions and 2 deletions
|
@ -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 <chrono>
|
||||
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue