From 9da78f61261067d97600771032ff8f8c335a6a43 Mon Sep 17 00:00:00 2001 From: Steveice10 <1269164+Steveice10@users.noreply.github.com> Date: Tue, 28 Nov 2023 14:15:44 -0800 Subject: [PATCH] qt: Fix loading screen metadata retention when title has no metadata. (#7215) --- src/citra_qt/loading_screen.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/citra_qt/loading_screen.cpp b/src/citra_qt/loading_screen.cpp index e4d61652b6..23d15b9d43 100644 --- a/src/citra_qt/loading_screen.cpp +++ b/src/citra_qt/loading_screen.cpp @@ -13,6 +13,7 @@ #include #include #include +#include #include "citra_qt/loading_screen.h" #include "common/logging/log.h" #include "core/loader/loader.h" @@ -129,11 +130,17 @@ void LoadingScreen::Prepare(Loader::AppLoader& loader) { if (loader.ReadIcon(buffer) == Loader::ResultStatus::Success) { QPixmap icon = GetQPixmapFromSMDH(buffer); ui->icon->setPixmap(icon); + } else { + ui->icon->clear(); } std::string title; - if (loader.ReadTitle(title) == Loader::ResultStatus::Success) { - ui->title->setText(tr("Now Loading\n%1").arg(QString::fromStdString(title))); + if (loader.ReadTitle(title) != Loader::ResultStatus::Success) { + u64 program_id; + if (loader.ReadProgramId(program_id) == Loader::ResultStatus::Success) { + title = fmt::format("{:016x}", program_id); + } } + ui->title->setText(tr("Now Loading\n%1").arg(QString::fromStdString(title))); eta_shown = false; OnLoadProgress(VideoCore::LoadCallbackStage::Prepare, 0, 0); }