diff options
author | Lioncash <mathew1800@gmail.com> | 2018-12-05 00:39:32 +0100 |
---|---|---|
committer | Lioncash <mathew1800@gmail.com> | 2018-12-05 00:39:35 +0100 |
commit | a49fd7fd57ed9a2a1a40dc0b99942bd1b18db414 (patch) | |
tree | 13c35104a52050ed53af972552b00adccc5ef435 /src | |
parent | yuzu/game_list_worker: Deduplicate game list entry creation (diff) | |
download | yuzu-a49fd7fd57ed9a2a1a40dc0b99942bd1b18db414.tar yuzu-a49fd7fd57ed9a2a1a40dc0b99942bd1b18db414.tar.gz yuzu-a49fd7fd57ed9a2a1a40dc0b99942bd1b18db414.tar.bz2 yuzu-a49fd7fd57ed9a2a1a40dc0b99942bd1b18db414.tar.lz yuzu-a49fd7fd57ed9a2a1a40dc0b99942bd1b18db414.tar.xz yuzu-a49fd7fd57ed9a2a1a40dc0b99942bd1b18db414.tar.zst yuzu-a49fd7fd57ed9a2a1a40dc0b99942bd1b18db414.zip |
Diffstat (limited to 'src')
-rw-r--r-- | src/yuzu/game_list_worker.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/yuzu/game_list_worker.cpp b/src/yuzu/game_list_worker.cpp index 3d8787dd0..6d41809fb 100644 --- a/src/yuzu/game_list_worker.cpp +++ b/src/yuzu/game_list_worker.cpp @@ -163,13 +163,12 @@ 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 { - const std::string physical_name = directory + DIR_SEP + virtual_name; - if (stop_processing) { // Breaks the callback loop return false; } + const std::string physical_name = directory + DIR_SEP + virtual_name; const QFileInfo file_info(QString::fromStdString(physical_name)); if (!file_info.isDir() && file_info.suffix() == QStringLiteral("nca")) { auto nca = @@ -188,12 +187,13 @@ void GameListWorker::FillControlMap(const std::string& dir_path) { void GameListWorker::AddFstEntriesToGameList(const std::string& dir_path, unsigned int recursion) { const auto callback = [this, recursion](u64* num_entries_out, const std::string& directory, const std::string& virtual_name) -> bool { - 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); + const std::string physical_name = directory + DIR_SEP + virtual_name; + const bool is_dir = FileUtil::IsDirectory(physical_name); if (!is_dir && (HasSupportedFileExtension(physical_name) || IsExtractedNCAMain(physical_name))) { std::unique_ptr<Loader::AppLoader> loader = |