diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/yuzu/main.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index e28679cd1..bb7f93a8c 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp | |||
| @@ -631,9 +631,15 @@ void GMainWindow::OnMenuLoadFile() { | |||
| 631 | } | 631 | } |
| 632 | 632 | ||
| 633 | void GMainWindow::OnMenuLoadFolder() { | 633 | void GMainWindow::OnMenuLoadFolder() { |
| 634 | QDir dir = QFileDialog::getExistingDirectory(this, tr("Open Extracted ROM Directory")); | 634 | const QString dir_path = |
| 635 | QFileDialog::getExistingDirectory(this, tr("Open Extracted ROM Directory")); | ||
| 635 | 636 | ||
| 636 | QStringList matching_main = dir.entryList(QStringList("main"), QDir::Files); | 637 | if (dir_path.isNull()) { |
| 638 | return; | ||
| 639 | } | ||
| 640 | |||
| 641 | const QDir dir{dir_path}; | ||
| 642 | const QStringList matching_main = dir.entryList(QStringList("main"), QDir::Files); | ||
| 637 | if (matching_main.size() == 1) { | 643 | if (matching_main.size() == 1) { |
| 638 | BootGame(dir.path() + DIR_SEP + matching_main[0]); | 644 | BootGame(dir.path() + DIR_SEP + matching_main[0]); |
| 639 | } else { | 645 | } else { |