Merge pull request #8313 from JosJuice/gamelist-xml

GameFile: Support HBC-style XML metadata
This commit is contained in:
Léo Lam
2019-11-09 22:59:26 +01:00
committed by GitHub
9 changed files with 125 additions and 19 deletions

View File

@ -73,7 +73,7 @@ QGroupBox* InfoWidget::CreateISODetails()
QLineEdit* country = CreateValueDisplay(DiscIO::GetName(m_game.GetCountry(), true));
const std::string game_maker = m_game.GetMaker();
const std::string game_maker = m_game.GetMaker(UICommon::GameFile::Variant::LongAndNotCustom);
QLineEdit* maker =
CreateValueDisplay((game_maker.empty() ? UNKNOWN_NAME.toStdString() : game_maker) + " (" +

View File

@ -442,7 +442,7 @@ void GameList::ExportWiiSave()
for (const auto& game : GetSelectedGames())
{
if (!WiiSave::Export(game->GetTitleID(), export_dir.toStdString()))
failed.push_back(game->GetName());
failed.push_back(game->GetName(UICommon::GameFile::Variant::LongAndPossiblyCustom));
}
if (!failed.isEmpty())

View File

@ -124,13 +124,17 @@ QVariant GameListModel::data(const QModelIndex& index, int role) const
case COL_DESCRIPTION:
if (role == Qt::DisplayRole || role == Qt::InitialSortOrderRole)
{
return QString::fromStdString(game.GetDescription())
return QString::fromStdString(
game.GetDescription(UICommon::GameFile::Variant::LongAndPossiblyCustom))
.replace(QLatin1Char('\n'), QLatin1Char(' '));
}
break;
case COL_MAKER:
if (role == Qt::DisplayRole || role == Qt::InitialSortOrderRole)
return QString::fromStdString(game.GetMaker());
{
return QString::fromStdString(
game.GetMaker(UICommon::GameFile::Variant::LongAndPossiblyCustom));
}
break;
case COL_FILE_NAME:
if (role == Qt::DisplayRole || role == Qt::InitialSortOrderRole)