diff options
author | bunnei <bunneidev@gmail.com> | 2018-10-25 01:39:43 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-25 01:39:43 +0200 |
commit | b43cfe6c02dba19029163f86429f0344a57d1f4b (patch) | |
tree | 3340290a19eb79d23dedf1b2c8a7e69e68028c7d | |
parent | Merge pull request #1570 from lioncash/optional (diff) | |
parent | game_list_worker: Use QString's formatting instead of fmt in FormatPatchNameVersions() (diff) | |
download | yuzu-b43cfe6c02dba19029163f86429f0344a57d1f4b.tar yuzu-b43cfe6c02dba19029163f86429f0344a57d1f4b.tar.gz yuzu-b43cfe6c02dba19029163f86429f0344a57d1f4b.tar.bz2 yuzu-b43cfe6c02dba19029163f86429f0344a57d1f4b.tar.lz yuzu-b43cfe6c02dba19029163f86429f0344a57d1f4b.tar.xz yuzu-b43cfe6c02dba19029163f86429f0344a57d1f4b.tar.zst yuzu-b43cfe6c02dba19029163f86429f0344a57d1f4b.zip |
-rw-r--r-- | src/yuzu/game_list_worker.cpp | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/yuzu/game_list_worker.cpp b/src/yuzu/game_list_worker.cpp index 3881aba5f..3d865a12d 100644 --- a/src/yuzu/game_list_worker.cpp +++ b/src/yuzu/game_list_worker.cpp @@ -62,19 +62,24 @@ QString FormatPatchNameVersions(const FileSys::PatchManager& patch_manager, FileSys::VirtualFile update_raw; loader.ReadUpdateRaw(update_raw); for (const auto& kv : patch_manager.GetPatchVersionNames(update_raw)) { - if (!updatable && kv.first == "Update") + const bool is_update = kv.first == "Update"; + if (!updatable && is_update) { continue; + } + + const QString type = QString::fromStdString(kv.first); if (kv.second.empty()) { - out.append(fmt::format("{}\n", kv.first).c_str()); + out.append(QStringLiteral("%1\n").arg(type)); } else { auto ver = kv.second; // Display container name for packed updates - if (ver == "PACKED" && kv.first == "Update") + if (is_update && ver == "PACKED") { ver = Loader::GetFileTypeString(loader.GetFileType()); + } - out.append(fmt::format("{} ({})\n", kv.first, ver).c_str()); + out.append(QStringLiteral("%1 (%2)\n").arg(type, QString::fromStdString(ver))); } } |