diff options
| author | Kloen Lansfiel <kloen@outlawkiwi.com> | 2017-02-12 21:28:56 +0100 |
|---|---|---|
| committer | Yuri Kunde Schlesner <yuriks@yuriks.net> | 2017-02-12 12:28:56 -0800 |
| commit | 30ff675f0284a2ed972fa6cc944e0a96c56d4dd6 (patch) | |
| tree | 32e88bf2d1846f9778b0b1d0600429c67dc2298e /src/citra_qt/main.cpp | |
| parent | da6a40e3d1beaf17847b973d0389a2d9ab66aa9b (diff) | |
citra-qt: Don't attempt to scan files with unsupported extensions (#2402)
Diffstat (limited to 'src/citra_qt/main.cpp')
| -rw-r--r-- | src/citra_qt/main.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/citra_qt/main.cpp b/src/citra_qt/main.cpp index f765c0147..3c2e19344 100644 --- a/src/citra_qt/main.cpp +++ b/src/citra_qt/main.cpp @@ -466,9 +466,14 @@ void GMainWindow::OnGameListOpenSaveFolder(u64 program_id) { } void GMainWindow::OnMenuLoadFile() { - QString filename = - QFileDialog::getOpenFileName(this, tr("Load File"), UISettings::values.roms_path, - tr("3DS executable (*.3ds *.3dsx *.elf *.axf *.cci *.cxi)")); + QString extensions; + for (const auto& piece : game_list->supported_file_extensions) + extensions += "*." + piece + " "; + + QString file_filter = tr("3DS executable") + " (" + extensions + ")"; + + QString filename = QFileDialog::getOpenFileName(this, tr("Load File"), + UISettings::values.roms_path, file_filter); if (!filename.isEmpty()) { UISettings::values.roms_path = QFileInfo(filename).path(); |
