diff options
| author | JosJuice <josjuice@gmail.com> | 2019-04-20 12:38:40 +0200 |
|---|---|---|
| committer | JosJuice <josjuice@gmail.com> | 2019-04-27 14:00:58 +0200 |
| commit | 3bef561e5d85a9ea99faa6c1d5d91011607e8c21 (patch) | |
| tree | 207b136f11fde0d6a3579e948cff21377179b1ef /Source/Core/UICommon/GameFile.cpp | |
| parent | 861472efdf98458e75989c1a197e0be903087eeb (diff) | |
Make GameFile::GetUniqueIdentifier independent of language setting
My bad.
We need this in the situation where two users are using different
languages and the game has a different name in each language.
Diffstat (limited to 'Source/Core/UICommon/GameFile.cpp')
| -rw-r--r-- | Source/Core/UICommon/GameFile.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Source/Core/UICommon/GameFile.cpp b/Source/Core/UICommon/GameFile.cpp index b963450cc7..254d19bdf7 100644 --- a/Source/Core/UICommon/GameFile.cpp +++ b/Source/Core/UICommon/GameFile.cpp @@ -468,7 +468,12 @@ std::string GameFile::GetUniqueIdentifier() const if (GetRevision() != 0) info.push_back("Revision " + std::to_string(GetRevision())); - const std::string& name = GetName(); + std::string name = GetLongName(DiscIO::Language::English); + if (name.empty()) + { + // Use the file name as a fallback. Not necessarily consistent, but it's the best we have + name = m_file_name; + } int disc_number = GetDiscNumber() + 1; |
