mirror of
https://github.com/Lime3DS/Lime3DS.git
synced 2024-11-23 18:19:21 +01:00
qt: Fix loading screen metadata retention when title has no metadata. (#7215)
This commit is contained in:
parent
0842ee6d7b
commit
9da78f6126
@ -13,6 +13,7 @@
|
|||||||
#include <QString>
|
#include <QString>
|
||||||
#include <QStyleOption>
|
#include <QStyleOption>
|
||||||
#include <QTime>
|
#include <QTime>
|
||||||
|
#include <fmt/format.h>
|
||||||
#include "citra_qt/loading_screen.h"
|
#include "citra_qt/loading_screen.h"
|
||||||
#include "common/logging/log.h"
|
#include "common/logging/log.h"
|
||||||
#include "core/loader/loader.h"
|
#include "core/loader/loader.h"
|
||||||
@ -129,11 +130,17 @@ void LoadingScreen::Prepare(Loader::AppLoader& loader) {
|
|||||||
if (loader.ReadIcon(buffer) == Loader::ResultStatus::Success) {
|
if (loader.ReadIcon(buffer) == Loader::ResultStatus::Success) {
|
||||||
QPixmap icon = GetQPixmapFromSMDH(buffer);
|
QPixmap icon = GetQPixmapFromSMDH(buffer);
|
||||||
ui->icon->setPixmap(icon);
|
ui->icon->setPixmap(icon);
|
||||||
|
} else {
|
||||||
|
ui->icon->clear();
|
||||||
}
|
}
|
||||||
std::string title;
|
std::string title;
|
||||||
if (loader.ReadTitle(title) == Loader::ResultStatus::Success) {
|
if (loader.ReadTitle(title) != Loader::ResultStatus::Success) {
|
||||||
ui->title->setText(tr("Now Loading\n%1").arg(QString::fromStdString(title)));
|
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;
|
eta_shown = false;
|
||||||
OnLoadProgress(VideoCore::LoadCallbackStage::Prepare, 0, 0);
|
OnLoadProgress(VideoCore::LoadCallbackStage::Prepare, 0, 0);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user