From acc8fe5a2a2d46c0f89642a9eccaedcea47c6c4f Mon Sep 17 00:00:00 2001 From: Zach Hilman Date: Thu, 14 Jun 2018 17:25:40 -0400 Subject: Bug fixes, testing, and review changes --- src/yuzu/main.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src/yuzu/main.cpp') diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index e2afe2131..97be548d7 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp @@ -13,6 +13,7 @@ #include #include #include +#include "common/common_paths.h" #include "common/logging/backend.h" #include "common/logging/filter.h" #include "common/logging/log.h" @@ -568,9 +569,12 @@ void GMainWindow::OnMenuLoadFile() { void GMainWindow::OnMenuLoadFolder() { QDir dir = QFileDialog::getExistingDirectory(this, tr("Open Extracted ROM Directory")); - QStringList matchingMain = dir.entryList(QStringList() << "main", QDir::Files); - if (matchingMain.size() == 1) { - BootGame(matchingMain[0]); + QStringList matching_main = dir.entryList(QStringList("main"), QDir::Files); + if (matching_main.size() == 1) { + BootGame(dir.path() + DIR_SEP + matching_main[0]); + } else { + QMessageBox::warning(this, tr("Invalid Directory Selected"), + tr("The directory you have selected does not contain a 'main' file.")); } } -- cgit v1.2.3