mirror of
https://github.com/yuzu-mirror/yuzu.git
synced 2024-09-09 15:39:07 +01:00
Merge pull request #944 from lioncash/menu
qt: Don't show error dialog when canceling the Load Folder dialog
This commit is contained in:
commit
645d35ac32
1 changed files with 8 additions and 2 deletions
|
@ -631,9 +631,15 @@ void GMainWindow::OnMenuLoadFile() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void GMainWindow::OnMenuLoadFolder() {
|
void GMainWindow::OnMenuLoadFolder() {
|
||||||
QDir dir = QFileDialog::getExistingDirectory(this, tr("Open Extracted ROM Directory"));
|
const QString dir_path =
|
||||||
|
QFileDialog::getExistingDirectory(this, tr("Open Extracted ROM Directory"));
|
||||||
|
|
||||||
QStringList matching_main = dir.entryList(QStringList("main"), QDir::Files);
|
if (dir_path.isNull()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
const QDir dir{dir_path};
|
||||||
|
const QStringList matching_main = dir.entryList(QStringList("main"), QDir::Files);
|
||||||
if (matching_main.size() == 1) {
|
if (matching_main.size() == 1) {
|
||||||
BootGame(dir.path() + DIR_SEP + matching_main[0]);
|
BootGame(dir.path() + DIR_SEP + matching_main[0]);
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue