From c01d4e8621f9cddf907832b1723a780965c6fda2 Mon Sep 17 00:00:00 2001 From: Matthew Budd Date: Sat, 24 Oct 2020 09:43:38 -0400 Subject: [PATCH] Added all non-compressed useable file types to the open ROM file dialog filters for Qt GUI. --- src/drivers/Qt/ConsoleWindow.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/drivers/Qt/ConsoleWindow.cpp b/src/drivers/Qt/ConsoleWindow.cpp index 9acfef55..806d7a06 100644 --- a/src/drivers/Qt/ConsoleWindow.cpp +++ b/src/drivers/Qt/ConsoleWindow.cpp @@ -712,9 +712,18 @@ void consoleWin_t::openROMFile(void) char dir[512]; QFileDialog dialog(this, tr("Open ROM File") ); + const QStringList filters( + { "All Useable files (*.nes *.NES *.nsf *.NSF *.fds *.FDS *.unf *.UNF *.unif *.UNIF)", + "NES files (*.nes *.NES)", + "NSF files (*.nsf *.NSF)", + "UNF files (*.unf *.UNF *.unif *.UNIF)", + "FDS files (*.fds *.FDS)", + "Any files (*)" + }); + dialog.setFileMode(QFileDialog::ExistingFile); - dialog.setNameFilter(tr("NES files (*.nes *.NES) ;; All files (*)")); + dialog.setNameFilters( filters ); dialog.setViewMode(QFileDialog::List); dialog.setFilter( QDir::AllEntries | QDir::AllDirs | QDir::Hidden );