Multiple Install Folders (#1308)

* multiple install folders implimentation

* clang format

* paths setting tab

* clang format
This commit is contained in:
ElBread3 2024-10-10 02:28:59 -05:00 committed by GitHub
parent c9f894c45a
commit 56e8ed7833
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 278 additions and 21 deletions

View file

@ -10,14 +10,16 @@ GameInfoClass::GameInfoClass() = default;
GameInfoClass::~GameInfoClass() = default;
void GameInfoClass::GetGameInfo(QWidget* parent) {
QString installDir;
Common::FS::PathToQString(installDir, Config::getGameInstallDir());
QStringList filePaths;
QDir parentFolder(installDir);
QFileInfoList fileList = parentFolder.entryInfoList(QDir::Dirs | QDir::NoDotAndDotDot);
for (const auto& fileInfo : fileList) {
if (fileInfo.isDir()) {
filePaths.append(fileInfo.absoluteFilePath());
for (const auto& installLoc : Config::getGameInstallDirs()) {
QString installDir;
Common::FS::PathToQString(installDir, installLoc);
QDir parentFolder(installDir);
QFileInfoList fileList = parentFolder.entryInfoList(QDir::Dirs | QDir::NoDotAndDotDot);
for (const auto& fileInfo : fileList) {
if (fileInfo.isDir()) {
filePaths.append(fileInfo.absoluteFilePath());
}
}
}
m_games = QtConcurrent::mapped(filePaths, [&](const QString& path) {