aboutsummaryrefslogtreecommitdiff
path: root/src/yuzu/game_list_worker.h
diff options
context:
space:
mode:
authorfearlessTobi <thm.frey@gmail.com>2019-05-01 23:21:04 +0200
committerFearlessTobi <thm.frey@gmail.com>2019-09-04 16:47:32 +0200
commit2d8eba5bafd7fe9da00c8a57c605a503c3ece478 (patch)
treec3bc64c33ab43f6bd0d7bb6f4ec63b11490a41e8 /src/yuzu/game_list_worker.h
parent7fc5af36226676d2ebc07a7a3d3cd82c536f206a (diff)
yuzu: Add support for multiple game directories
Ported from https://github.com/citra-emu/citra/pull/3617.
Diffstat (limited to 'src/yuzu/game_list_worker.h')
-rw-r--r--src/yuzu/game_list_worker.h25
1 files changed, 14 insertions, 11 deletions
diff --git a/src/yuzu/game_list_worker.h b/src/yuzu/game_list_worker.h
index 7c3074af9..46ec96516 100644
--- a/src/yuzu/game_list_worker.h
+++ b/src/yuzu/game_list_worker.h
@@ -33,9 +33,10 @@ class GameListWorker : public QObject, public QRunnable {
Q_OBJECT
public:
- GameListWorker(std::shared_ptr<FileSys::VfsFilesystem> vfs,
- FileSys::ManualContentProvider* provider, QString dir_path, bool deep_scan,
- const CompatibilityList& compatibility_list);
+ explicit GameListWorker(std::shared_ptr<FileSys::VfsFilesystem> vfs,
+ FileSys::ManualContentProvider* provider,
+ QList<UISettings::GameDir>& game_dirs,
+ const CompatibilityList& compatibility_list);
~GameListWorker() override;
/// Starts the processing of directory tree information.
@@ -48,31 +49,33 @@ signals:
/**
* The `EntryReady` signal is emitted once an entry has been prepared and is ready
* to be added to the game list.
- * @param entry_items a list with `QStandardItem`s that make up the columns of the new entry.
+ * @param entry_items a list with `QStandardItem`s that make up the columns of the new
+ * entry.
*/
- void EntryReady(QList<QStandardItem*> entry_items);
+ void DirEntryReady(GameListDir* entry_items);
+ void EntryReady(QList<QStandardItem*> entry_items, GameListDir* parent_dir);
/**
- * After the worker has traversed the game directory looking for entries, this signal is emitted
- * with a list of folders that should be watched for changes as well.
+ * After the worker has traversed the game directory looking for entries, this signal is
+ * emitted with a list of folders that should be watched for changes as well.
*/
void Finished(QStringList watch_list);
private:
- void AddTitlesToGameList();
+ void AddTitlesToGameList(GameListDir* parent_dir);
enum class ScanTarget {
FillManualContentProvider,
PopulateGameList,
};
- void ScanFileSystem(ScanTarget target, const std::string& dir_path, unsigned int recursion = 0);
+ void ScanFileSystem(ScanTarget target, const std::string& dir_path, unsigned int recursion,
+ GameListDir* parent_dir);
std::shared_ptr<FileSys::VfsFilesystem> vfs;
FileSys::ManualContentProvider* provider;
QStringList watch_list;
- QString dir_path;
- bool deep_scan;
const CompatibilityList& compatibility_list;
+ QList<UISettings::GameDir>& game_dirs;
std::atomic_bool stop_processing;
};