summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2018-10-13 16:23:50 +0200
committerLioncash <mathew1800@gmail.com>2018-10-13 16:35:18 +0200
commita4c57436fc157ccfcc6b3a93555b312fd1d14851 (patch)
treec7f9817f53ed07016d9101c3e5adaa5c151cdf9e /src
parentMerge pull request #1409 from DarkLordZach/key-derivation (diff)
downloadyuzu-a4c57436fc157ccfcc6b3a93555b312fd1d14851.tar
yuzu-a4c57436fc157ccfcc6b3a93555b312fd1d14851.tar.gz
yuzu-a4c57436fc157ccfcc6b3a93555b312fd1d14851.tar.bz2
yuzu-a4c57436fc157ccfcc6b3a93555b312fd1d14851.tar.lz
yuzu-a4c57436fc157ccfcc6b3a93555b312fd1d14851.tar.xz
yuzu-a4c57436fc157ccfcc6b3a93555b312fd1d14851.tar.zst
yuzu-a4c57436fc157ccfcc6b3a93555b312fd1d14851.zip
Diffstat (limited to 'src')
-rw-r--r--src/yuzu/main.cpp26
1 files changed, 12 insertions, 14 deletions
diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp
index fc186dc2d..dd11402e8 100644
--- a/src/yuzu/main.cpp
+++ b/src/yuzu/main.cpp
@@ -908,22 +908,20 @@ void GMainWindow::OnGameListNavigateToGamedbEntry(u64 program_id,
}
void GMainWindow::OnMenuLoadFile() {
- QString extensions;
- for (const auto& piece : game_list->supported_file_extensions)
- extensions += "*." + piece + " ";
+ const QString extensions =
+ QString("*.").append(GameList::supported_file_extensions.join(" *.")).append(" main");
+ const QString file_filter = tr("Switch Executable (%1);;All Files (*.*)",
+ "%1 is an identifier for the Switch executable file extensions.")
+ .arg(extensions);
+ const QString filename = QFileDialog::getOpenFileName(
+ this, tr("Load File"), UISettings::values.roms_path, file_filter);
- extensions += "main ";
-
- QString file_filter = tr("Switch Executable") + " (" + extensions + ")";
- file_filter += ";;" + tr("All Files (*.*)");
-
- QString filename = QFileDialog::getOpenFileName(this, tr("Load File"),
- UISettings::values.roms_path, file_filter);
- if (!filename.isEmpty()) {
- UISettings::values.roms_path = QFileInfo(filename).path();
-
- BootGame(filename);
+ if (filename.isEmpty()) {
+ return;
}
+
+ UISettings::values.roms_path = QFileInfo(filename).path();
+ BootGame(filename);
}
void GMainWindow::OnMenuLoadFolder() {