diff options
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> | 2015-09-06 08:59:04 +0200 |
---|---|---|
committer | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> | 2016-05-21 17:41:02 +0200 |
commit | 8ab6f26c09e5b77a051fa545570ca2986c45bf4a (patch) | |
tree | a0664d2b9bb548cbd7f78ed60b846a88c09f90f4 /src/citra_qt/game_list.cpp | |
parent | Appveyor: Restore working directory after test_script (#1835) (diff) | |
download | yuzu-8ab6f26c09e5b77a051fa545570ca2986c45bf4a.tar yuzu-8ab6f26c09e5b77a051fa545570ca2986c45bf4a.tar.gz yuzu-8ab6f26c09e5b77a051fa545570ca2986c45bf4a.tar.bz2 yuzu-8ab6f26c09e5b77a051fa545570ca2986c45bf4a.tar.lz yuzu-8ab6f26c09e5b77a051fa545570ca2986c45bf4a.tar.xz yuzu-8ab6f26c09e5b77a051fa545570ca2986c45bf4a.tar.zst yuzu-8ab6f26c09e5b77a051fa545570ca2986c45bf4a.zip |
Diffstat (limited to '')
-rw-r--r-- | src/citra_qt/game_list.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/citra_qt/game_list.cpp b/src/citra_qt/game_list.cpp index d4ac9c96e..adbcf24e8 100644 --- a/src/citra_qt/game_list.cpp +++ b/src/citra_qt/game_list.cpp @@ -118,19 +118,20 @@ void GameList::LoadInterfaceLayout() item_model->sort(header->sortIndicatorSection(), header->sortIndicatorOrder()); } -void GameListWorker::AddFstEntriesToGameList(const std::string& dir_path, bool deep_scan) +void GameListWorker::AddFstEntriesToGameList(const std::string& dir_path, unsigned int recursion) { const auto callback = [&](unsigned* num_entries_out, const std::string& directory, - const std::string& virtual_name) -> bool { + const std::string& virtual_name, + unsigned int recursion) -> bool { std::string physical_name = directory + DIR_SEP + virtual_name; if (stop_processing) return false; // Breaks the callback loop. - if (deep_scan && FileUtil::IsDirectory(physical_name)) { - AddFstEntriesToGameList(physical_name, true); + if (recursion > 0 && FileUtil::IsDirectory(physical_name)) { + AddFstEntriesToGameList(physical_name, recursion - 1); } else { std::string filename_filename, filename_extension; Common::SplitPath(physical_name, nullptr, &filename_filename, &filename_extension); @@ -169,7 +170,7 @@ void GameListWorker::AddFstEntriesToGameList(const std::string& dir_path, bool d void GameListWorker::run() { stop_processing = false; - AddFstEntriesToGameList(dir_path.toStdString(), deep_scan); + AddFstEntriesToGameList(dir_path.toStdString(), deep_scan ? 256 : 0); emit Finished(); } |