Merge pull request #6774 from lat9nq/remove-global-yuzu

yuzu qt: Remove global system instances
This commit is contained in:
Morph 2021-10-14 14:12:22 -04:00 committed by GitHub
commit b02d662980
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
75 changed files with 716 additions and 654 deletions

View file

@ -304,8 +304,8 @@ void GameList::OnFilterCloseClicked() {
}
GameList::GameList(FileSys::VirtualFilesystem vfs, FileSys::ManualContentProvider* provider,
GMainWindow* parent)
: QWidget{parent}, vfs(std::move(vfs)), provider(provider) {
Core::System& system_, GMainWindow* parent)
: QWidget{parent}, vfs(std::move(vfs)), provider(provider), system{system_} {
watcher = new QFileSystemWatcher(this);
connect(watcher, &QFileSystemWatcher::directoryChanged, this, &GameList::RefreshGameDirectory);
@ -737,7 +737,8 @@ void GameList::PopulateAsync(QVector<UISettings::GameDir>& game_dirs) {
emit ShouldCancelWorker();
GameListWorker* worker = new GameListWorker(vfs, provider, game_dirs, compatibility_list);
GameListWorker* worker =
new GameListWorker(vfs, provider, game_dirs, compatibility_list, system);
connect(worker, &GameListWorker::EntryReady, this, &GameList::AddEntry, Qt::QueuedConnection);
connect(worker, &GameListWorker::DirEntryReady, this, &GameList::AddDirEntry,