aboutsummaryrefslogtreecommitdiff
path: root/src/qt_common
diff options
context:
space:
mode:
authorTakoroka <137927095+Takoroka@users.noreply.github.com>2026-10-29 04:22:38 -0400
committerTakoroka <137927095+Takoroka@users.noreply.github.com>2026-10-29 20:49:46 -0400
commit7fa88f0bb18ab0ae1896e6060a0c770e73446f51 (patch)
tree4caa8d186bfc2609551656cca77c1c7ac22aee72 /src/qt_common
parentd56039ace99338293658f931a871e4dba203e3ab (diff)
game_list: name loose ExeFS dumps after their game folder
A dumped ExeFS (<game>/exefs/main) has no control data, so it showed up without a title. Use the game folder's name instead, with "(update)" for <game>/updates/exefs/main.
Diffstat (limited to 'src/qt_common')
-rw-r--r--src/qt_common/game_list/worker.cpp21
1 files changed, 20 insertions, 1 deletions
diff --git a/src/qt_common/game_list/worker.cpp b/src/qt_common/game_list/worker.cpp
index 6b6f93447d..70577cb270 100644
--- a/src/qt_common/game_list/worker.cpp
+++ b/src/qt_common/game_list/worker.cpp
@@ -167,6 +167,19 @@ QString FormatGameName(const std::string& physical_name) {
return physical_name_as_qstring;
}
+// Loose ExeFS dumps (<game>/exefs/main, updates in <game>/updates/exefs/main) have no control
+// data, so they are named after their game folder.
+QString LooseExeFSName(const std::string& physical_name) {
+ QDir dir = QFileInfo(QString::fromStdString(physical_name)).dir();
+ if (dir.dirName().compare(QStringLiteral("exefs"), Qt::CaseInsensitive) != 0 || !dir.cdUp()) {
+ return {};
+ }
+ if (dir.dirName().compare(QStringLiteral("updates"), Qt::CaseInsensitive) == 0 && dir.cdUp()) {
+ return QObject::tr("%1 (update)").arg(dir.dirName());
+ }
+ return dir.dirName();
+}
+
QString FormatPatchNameVersions(const FileSys::PatchManager& patch_manager,
Loader::AppLoader& loader, bool updatable = true) {
QString out;
@@ -392,7 +405,13 @@ void GameListWorker::ScanFileSystem(ScanTarget target, const std::string& dir_pa
[[maybe_unused]] const auto res1 = app_loader->ReadIcon(icon);
std::string name = " ";
- [[maybe_unused]] const auto res3 = app_loader->ReadTitle(name);
+ const auto res3 = app_loader->ReadTitle(name);
+ if ((res3 != Loader::ResultStatus::Success || name.empty() || name == " ") &&
+ IsExtractedNCAMain(physical_name)) {
+ if (const QString loose = LooseExeFSName(physical_name); !loose.isEmpty()) {
+ name = loose.toStdString();
+ }
+ }
const FileSys::PatchManager patch{id, system.GetFileSystemController(),
system.GetContentProvider()};