diff options
| author | Leo Lam <leolino.lam@gmail.com> | 2017-08-20 23:29:27 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-08-20 23:29:27 +0200 |
| commit | 165a995cc4227e8863b04ba2f0de4fa3d62cd665 (patch) | |
| tree | 71d09bda243384f91944bce6abcd67f287b83666 /Source/Core | |
| parent | cfee348736c06d349dd2eda9df01e95987b4531c (diff) | |
| parent | 1a59ea3adb7845c693520ea64e61164577e5eacc (diff) | |
Merge pull request #5950 from ligfx/gamelistmodelfilenamefallback
GameListModel: fallback to file name if long name is empty
Diffstat (limited to 'Source/Core')
| -rw-r--r-- | Source/Core/DolphinQt2/GameList/GameFile.cpp | 1 | ||||
| -rw-r--r-- | Source/Core/DolphinQt2/GameList/GameListModel.cpp | 5 |
2 files changed, 4 insertions, 2 deletions
diff --git a/Source/Core/DolphinQt2/GameList/GameFile.cpp b/Source/Core/DolphinQt2/GameList/GameFile.cpp index 394b8b81a7..9797dcb31a 100644 --- a/Source/Core/DolphinQt2/GameList/GameFile.cpp +++ b/Source/Core/DolphinQt2/GameList/GameFile.cpp @@ -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; diff --git a/Source/Core/DolphinQt2/GameList/GameListModel.cpp b/Source/Core/DolphinQt2/GameList/GameListModel.cpp index 0cf62c92e0..f23ab586db 100644 --- a/Source/Core/DolphinQt2/GameList/GameListModel.cpp +++ b/Source/Core/DolphinQt2/GameList/GameListModel.cpp @@ -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; } |
