mirror of
https://git.citron-emu.org/citron/emulator
synced 2025-12-26 13:33:34 +00:00
Edit game_list_worker.h
This commit is contained in:
@@ -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 <deque>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <map> // Required for the online_stats map
|
||||
#include <utility> // Required for std::pair
|
||||
|
||||
#include <QList>
|
||||
#include <QObject>
|
||||
@@ -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<FileSys::VfsFilesystem> vfs_,
|
||||
FileSys::ManualContentProvider* provider_,
|
||||
QVector<UISettings::GameDir>& game_dirs_,
|
||||
const CompatibilityList& compatibility_list_,
|
||||
const PlayTime::PlayTimeManager& play_time_manager_,
|
||||
Core::System& system_);
|
||||
Core::System& system_,
|
||||
std::shared_ptr<Core::AnnounceMultiplayerSession> 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<u64, std::pair<int, int>>& online_stats);
|
||||
|
||||
void ScanFileSystem(ScanTarget target, const std::string& dir_path, bool deep_scan,
|
||||
GameListDir* parent_dir);
|
||||
GameListDir* parent_dir,
|
||||
const std::map<u64, std::pair<int, int>>& online_stats);
|
||||
|
||||
std::shared_ptr<FileSys::VfsFilesystem> vfs;
|
||||
FileSys::ManualContentProvider* provider;
|
||||
@@ -91,4 +101,5 @@ private:
|
||||
Common::Event processing_completed;
|
||||
|
||||
Core::System& system;
|
||||
std::shared_ptr<Core::AnnounceMultiplayerSession> session;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user