summaryrefslogtreecommitdiff
path: root/src/citra_qt
diff options
context:
space:
mode:
Diffstat (limited to 'src/citra_qt')
-rw-r--r--src/citra_qt/debugger/graphics/graphics_cmdlists.cpp2
-rw-r--r--src/citra_qt/debugger/graphics/graphics_surface.cpp3
-rw-r--r--src/citra_qt/game_list.cpp11
-rw-r--r--src/citra_qt/game_list.h2
-rw-r--r--src/citra_qt/main.cpp11
5 files changed, 23 insertions, 6 deletions
diff --git a/src/citra_qt/debugger/graphics/graphics_cmdlists.cpp b/src/citra_qt/debugger/graphics/graphics_cmdlists.cpp
index 536548f36..c68fe753b 100644
--- a/src/citra_qt/debugger/graphics/graphics_cmdlists.cpp
+++ b/src/citra_qt/debugger/graphics/graphics_cmdlists.cpp
@@ -72,7 +72,7 @@ QVariant GPUCommandListModel::data(const QModelIndex& index, int role) const {
if (role == Qt::DisplayRole) {
switch (index.column()) {
case 0:
- return QString::fromLatin1(Pica::Regs::GetCommandName(write.cmd_id).c_str());
+ return QString::fromLatin1(Pica::Regs::GetRegisterName(write.cmd_id));
case 1:
return QString("%1").arg(write.cmd_id, 3, 16, QLatin1Char('0'));
case 2:
diff --git a/src/citra_qt/debugger/graphics/graphics_surface.cpp b/src/citra_qt/debugger/graphics/graphics_surface.cpp
index f83c1f96c..47d9924e1 100644
--- a/src/citra_qt/debugger/graphics/graphics_surface.cpp
+++ b/src/citra_qt/debugger/graphics/graphics_surface.cpp
@@ -17,7 +17,8 @@
#include "core/hw/gpu.h"
#include "core/memory.h"
#include "video_core/pica_state.h"
-#include "video_core/regs.h"
+#include "video_core/regs_framebuffer.h"
+#include "video_core/regs_texturing.h"
#include "video_core/texture/texture_decode.h"
#include "video_core/utils.h"
diff --git a/src/citra_qt/game_list.cpp b/src/citra_qt/game_list.cpp
index 09469f3c5..28e01d81a 100644
--- a/src/citra_qt/game_list.cpp
+++ b/src/citra_qt/game_list.cpp
@@ -2,6 +2,7 @@
// Licensed under GPLv2 or any later version
// Refer to the license.txt file included.
+#include <QFileInfo>
#include <QHeaderView>
#include <QMenu>
#include <QThreadPool>
@@ -131,6 +132,14 @@ void GameList::LoadInterfaceLayout() {
item_model->sort(header->sortIndicatorSection(), header->sortIndicatorOrder());
}
+const QStringList GameList::supported_file_extensions = {"3ds", "3dsx", "elf", "axf",
+ "cci", "cxi", "app"};
+
+static bool HasSupportedFileExtension(const std::string& file_name) {
+ QFileInfo file = QFileInfo(file_name.c_str());
+ return GameList::supported_file_extensions.contains(file.completeSuffix(), Qt::CaseInsensitive);
+}
+
void GameListWorker::AddFstEntriesToGameList(const std::string& dir_path, unsigned int recursion) {
const auto callback = [this, recursion](unsigned* num_entries_out, const std::string& directory,
const std::string& virtual_name) -> bool {
@@ -139,7 +148,7 @@ void GameListWorker::AddFstEntriesToGameList(const std::string& dir_path, unsign
if (stop_processing)
return false; // Breaks the callback loop.
- if (!FileUtil::IsDirectory(physical_name)) {
+ if (!FileUtil::IsDirectory(physical_name) && HasSupportedFileExtension(physical_name)) {
std::unique_ptr<Loader::AppLoader> loader = Loader::GetLoader(physical_name);
if (!loader)
return true;
diff --git a/src/citra_qt/game_list.h b/src/citra_qt/game_list.h
index 1abf10051..e6b7eea0b 100644
--- a/src/citra_qt/game_list.h
+++ b/src/citra_qt/game_list.h
@@ -33,6 +33,8 @@ public:
void SaveInterfaceLayout();
void LoadInterfaceLayout();
+ static const QStringList supported_file_extensions;
+
signals:
void GameChosen(QString game_path);
void ShouldCancelWorker();
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();