summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2018-12-02 04:48:57 +0100
committerLioncash <mathew1800@gmail.com>2018-12-02 04:49:00 +0100
commitf1ecfcb8bc17b949a5d17d0c50f1a41350485e01 (patch)
tree4b9519f21fb4ff2fcb36b3cc52cab61ef589384b
parentFix debug build (diff)
downloadyuzu-f1ecfcb8bc17b949a5d17d0c50f1a41350485e01.tar
yuzu-f1ecfcb8bc17b949a5d17d0c50f1a41350485e01.tar.gz
yuzu-f1ecfcb8bc17b949a5d17d0c50f1a41350485e01.tar.bz2
yuzu-f1ecfcb8bc17b949a5d17d0c50f1a41350485e01.tar.lz
yuzu-f1ecfcb8bc17b949a5d17d0c50f1a41350485e01.tar.xz
yuzu-f1ecfcb8bc17b949a5d17d0c50f1a41350485e01.tar.zst
yuzu-f1ecfcb8bc17b949a5d17d0c50f1a41350485e01.zip
-rw-r--r--src/yuzu/game_list_worker.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/yuzu/game_list_worker.cpp b/src/yuzu/game_list_worker.cpp
index 362902e46..3d5f2c0f4 100644
--- a/src/yuzu/game_list_worker.cpp
+++ b/src/yuzu/game_list_worker.cpp
@@ -155,14 +155,15 @@ void GameListWorker::AddInstalledTitlesToGameList() {
void GameListWorker::FillControlMap(const std::string& dir_path) {
const auto nca_control_callback = [this](u64* num_entries_out, const std::string& directory,
const std::string& virtual_name) -> bool {
- std::string physical_name = directory + DIR_SEP + virtual_name;
+ const std::string physical_name = directory + DIR_SEP + virtual_name;
- if (stop_processing)
- return false; // Breaks the callback loop.
+ if (stop_processing) {
+ // Breaks the callback loop
+ return false;
+ }
- bool is_dir = FileUtil::IsDirectory(physical_name);
- QFileInfo file_info(physical_name.c_str());
- if (!is_dir && file_info.suffix().toStdString() == "nca") {
+ const QFileInfo file_info(QString::fromStdString(physical_name));
+ if (!file_info.isDir() && file_info.suffix() == QStringLiteral("nca")) {
auto nca =
std::make_unique<FileSys::NCA>(vfs->OpenFile(physical_name, FileSys::Mode::Read));
if (nca->GetType() == FileSys::NCAContentType::Control) {