diff options
| -rw-r--r-- | src/yuzu/game_list_worker.cpp | 13 |
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() { | |||
| 155 | void GameListWorker::FillControlMap(const std::string& dir_path) { | 155 | void GameListWorker::FillControlMap(const std::string& dir_path) { |
| 156 | const auto nca_control_callback = [this](u64* num_entries_out, const std::string& directory, | 156 | const auto nca_control_callback = [this](u64* num_entries_out, const std::string& directory, |
| 157 | const std::string& virtual_name) -> bool { | 157 | const std::string& virtual_name) -> bool { |
| 158 | std::string physical_name = directory + DIR_SEP + virtual_name; | 158 | const std::string physical_name = directory + DIR_SEP + virtual_name; |
| 159 | 159 | ||
| 160 | if (stop_processing) | 160 | if (stop_processing) { |
| 161 | return false; // Breaks the callback loop. | 161 | // Breaks the callback loop |
| 162 | return false; | ||
| 163 | } | ||
| 162 | 164 | ||
| 163 | bool is_dir = FileUtil::IsDirectory(physical_name); | 165 | const QFileInfo file_info(QString::fromStdString(physical_name)); |
| 164 | QFileInfo file_info(physical_name.c_str()); | 166 | if (!file_info.isDir() && file_info.suffix() == QStringLiteral("nca")) { |
| 165 | if (!is_dir && file_info.suffix().toStdString() == "nca") { | ||
| 166 | auto nca = | 167 | auto nca = |
| 167 | std::make_unique<FileSys::NCA>(vfs->OpenFile(physical_name, FileSys::Mode::Read)); | 168 | std::make_unique<FileSys::NCA>(vfs->OpenFile(physical_name, FileSys::Mode::Read)); |
| 168 | if (nca->GetType() == FileSys::NCAContentType::Control) { | 169 | if (nca->GetType() == FileSys::NCAContentType::Control) { |