Merge pull request #5950 from ligfx/gamelistmodelfilenamefallback

GameListModel: fallback to file name if long name is empty
This commit is contained in:
Leo Lam 2017-08-20 23:29:27 +02:00 committed by GitHub
commit 165a995cc4
2 changed files with 4 additions and 2 deletions

View File

@ -192,7 +192,6 @@ bool GameFile::TryLoadElfDol()
return false;
m_revision = 0;
m_long_names[DiscIO::Language::LANGUAGE_ENGLISH] = m_file_name;
m_platform = DiscIO::Platform::ELF_DOL;
m_region = DiscIO::Region::UNKNOWN_REGION;
m_country = DiscIO::Country::COUNTRY_UNKNOWN;

View File

@ -76,7 +76,10 @@ QVariant GameListModel::data(const QModelIndex& index, int role) const
Core::TitleDatabase::TitleType::Channel :
Core::TitleDatabase::TitleType::Other));
if (display_name.isEmpty())
return game->GetLongName();
display_name = game->GetLongName();
if (display_name.isEmpty())
display_name = game->GetFileName();
return display_name;
}