From df0247d42de82830f22a7d12dca52b6d495ae543 Mon Sep 17 00:00:00 2001 From: collecting Date: Sat, 4 Oct 2025 04:16:09 +0000 Subject: [PATCH] Edit game_list_worker.h --- src/citron/game_list_worker.h | 33 ++++++++++++++++++++++----------- 1 file changed, 22 insertions(+), 11 deletions(-) diff --git a/src/citron/game_list_worker.h b/src/citron/game_list_worker.h index 04d628dcf..723bbeb51 100644 --- a/src/citron/game_list_worker.h +++ b/src/citron/game_list_worker.h @@ -1,4 +1,5 @@ // SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project +// SPDX-FileCopyrightText: Copyright 2025 citron Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later #pragma once @@ -7,6 +8,8 @@ #include #include #include +#include // Required for the online_stats map +#include // Required for std::pair #include #include @@ -16,17 +19,21 @@ #include "common/thread.h" #include "citron/compatibility_list.h" #include "citron/play_time_manager.h" +#include "citron/multiplayer/state.h" +#include "network/announce_multiplayer_session.h" namespace Core { -class System; + class System; } class GameList; +class GameListDir; // Forward declare GameListDir class QStandardItem; namespace FileSys { -class NCA; -class VfsFilesystem; + class NCA; + class VfsFilesystem; + class ManualContentProvider; } // namespace FileSys /** @@ -37,12 +44,18 @@ class GameListWorker : public QObject, public QRunnable { Q_OBJECT public: + enum class ScanTarget { + FillManualContentProvider, + PopulateGameList, + }; + explicit GameListWorker(std::shared_ptr vfs_, FileSys::ManualContentProvider* provider_, QVector& game_dirs_, const CompatibilityList& compatibility_list_, const PlayTime::PlayTimeManager& play_time_manager_, - Core::System& system_); + Core::System& system_, + std::shared_ptr session_); ~GameListWorker() override; /// Starts the processing of directory tree information. @@ -66,15 +79,12 @@ private: void RecordEvent(F&& func); private: - void AddTitlesToGameList(GameListDir* parent_dir); - - enum class ScanTarget { - FillManualContentProvider, - PopulateGameList, - }; + void AddTitlesToGameList(GameListDir* parent_dir, + const std::map>& online_stats); void ScanFileSystem(ScanTarget target, const std::string& dir_path, bool deep_scan, - GameListDir* parent_dir); + GameListDir* parent_dir, + const std::map>& online_stats); std::shared_ptr vfs; FileSys::ManualContentProvider* provider; @@ -91,4 +101,5 @@ private: Common::Event processing_completed; Core::System& system; + std::shared_ptr session; };