diff options
| author | lat9nq <22451773+lat9nq@users.noreply.github.com> | 2021-07-30 09:32:26 -0400 |
|---|---|---|
| committer | Morph <39850852+Morph1984@users.noreply.github.com> | 2021-10-07 13:50:13 -0400 |
| commit | 4ce53ffe6a61cb853f2fdd88211f35cec63e2f70 (patch) | |
| tree | e2820ff4acde031dc0eb317a0610b478f0748321 /src/yuzu/game_list_worker.cpp | |
| parent | 493905665c2e9ea200301b44dcee599933f5b62c (diff) | |
game_list: Remove global instances of Core::System
Diffstat (limited to 'src/yuzu/game_list_worker.cpp')
| -rw-r--r-- | src/yuzu/game_list_worker.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/yuzu/game_list_worker.cpp b/src/yuzu/game_list_worker.cpp index 2d5492157..fd92b36df 100644 --- a/src/yuzu/game_list_worker.cpp +++ b/src/yuzu/game_list_worker.cpp @@ -228,16 +228,15 @@ QList<QStandardItem*> MakeGameListEntry(const std::string& path, const std::stri GameListWorker::GameListWorker(FileSys::VirtualFilesystem vfs, FileSys::ManualContentProvider* provider, QVector<UISettings::GameDir>& game_dirs, - const CompatibilityList& compatibility_list) + const CompatibilityList& compatibility_list, Core::System& system_) : vfs(std::move(vfs)), provider(provider), game_dirs(game_dirs), - compatibility_list(compatibility_list) {} + compatibility_list(compatibility_list), system{system_} {} GameListWorker::~GameListWorker() = default; void GameListWorker::AddTitlesToGameList(GameListDir* parent_dir) { using namespace FileSys; - auto& system = Core::System::GetInstance(); const auto& cache = dynamic_cast<ContentProviderUnion&>(system.GetContentProvider()); auto installed_games = cache.ListEntriesFilterOrigin(std::nullopt, TitleType::Application, @@ -285,10 +284,7 @@ void GameListWorker::AddTitlesToGameList(GameListDir* parent_dir) { void GameListWorker::ScanFileSystem(ScanTarget target, const std::string& dir_path, bool deep_scan, GameListDir* parent_dir) { - auto& system = Core::System::GetInstance(); - - const auto callback = [this, target, parent_dir, - &system](const std::filesystem::path& path) -> bool { + const auto callback = [this, target, parent_dir](const std::filesystem::path& path) -> bool { if (stop_processing) { // Breaks the callback loop. return false; |
