mirror of
https://github.com/Lime3DS/Lime3DS
synced 2024-12-26 17:12:37 -06:00
game_list: rewrite format
This commit is contained in:
parent
e5c8b9f0a2
commit
9504aa19d5
1 changed files with 5 additions and 4 deletions
|
@ -173,7 +173,7 @@ public:
|
||||||
&extension);
|
&extension);
|
||||||
QString title = data(TitleRole).toString();
|
QString title = data(TitleRole).toString();
|
||||||
QString second_name = QString::fromStdString(filename + extension);
|
QString second_name = QString::fromStdString(filename + extension);
|
||||||
QRegExp installed_system_pattern(
|
static QRegExp installed_system_pattern(
|
||||||
QString::fromStdString(
|
QString::fromStdString(
|
||||||
FileUtil::GetUserPath(D_SDMC_IDX) +
|
FileUtil::GetUserPath(D_SDMC_IDX) +
|
||||||
"Nintendo "
|
"Nintendo "
|
||||||
|
@ -182,9 +182,10 @@ public:
|
||||||
.replace("\\", "\\\\"));
|
.replace("\\", "\\\\"));
|
||||||
if (installed_system_pattern.exactMatch(QString::fromStdString(path))) {
|
if (installed_system_pattern.exactMatch(QString::fromStdString(path))) {
|
||||||
// Use a different mechanism for system / installed titles showing program ID
|
// Use a different mechanism for system / installed titles showing program ID
|
||||||
second_name = "000" +
|
second_name = QString("%1-%2")
|
||||||
QString::number(data(ProgramIdRole).toULongLong(), 16).toUpper() +
|
.arg(data(ProgramIdRole).toULongLong(), 16, 16, QChar('0'))
|
||||||
"-" + QString::fromStdString(filename);
|
.toUpper()
|
||||||
|
.arg(QString::fromStdString(filename));
|
||||||
}
|
}
|
||||||
return title + (title.isEmpty() ? "" : "\n ") + second_name;
|
return title + (title.isEmpty() ? "" : "\n ") + second_name;
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue