1
0
mirror of https://github.com/RPCS3/rpcs3.git synced 2024-11-26 04:32:35 +01:00

Don't search games when the dialog is cancelled

This commit is contained in:
Florin9doi 2024-01-28 12:06:12 +02:00 committed by Megamouse
parent e9713f9635
commit a7da245656

View File

@ -2424,10 +2424,15 @@ void main_window::CreateConnects()
return;
}
QStringList paths;
// Only select one folder for now
paths << QFileDialog::getExistingDirectory(this, tr("Select a folder containing one or more games"), qstr(fs::get_config_dir()), QFileDialog::ShowDirsOnly | QFileDialog::DontResolveSymlinks);
QString dir = QFileDialog::getExistingDirectory(this, tr("Select a folder containing one or more games"), qstr(fs::get_config_dir()), QFileDialog::ShowDirsOnly | QFileDialog::DontResolveSymlinks);
if (dir.isEmpty())
{
return;
}
QStringList paths;
paths << dir;
AddGamesFromDirs(std::move(paths));
});