summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to '')
-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
-rw-r--r--src/core/core.cpp11
-rw-r--r--src/core/frontend/emu_window.cpp2
-rw-r--r--src/core/hle/service/hid/hid.h4
-rw-r--r--src/video_core/shader/shader.cpp3
7 files changed, 23 insertions, 21 deletions
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();
diff --git a/src/core/core.cpp b/src/core/core.cpp
index 202cd332b..c9c9b7615 100644
--- a/src/core/core.cpp
+++ b/src/core/core.cpp
@@ -67,10 +67,6 @@ System::ResultStatus System::SingleStep() {
}
System::ResultStatus System::Load(EmuWindow* emu_window, const std::string& filepath) {
- if (app_loader) {
- app_loader.reset();
- }
-
app_loader = Loader::GetLoader(filepath);
if (!app_loader) {
@@ -123,10 +119,6 @@ void System::Reschedule() {
}
System::ResultStatus System::Init(EmuWindow* emu_window, u32 system_mode) {
- if (cpu_core) {
- cpu_core.reset();
- }
-
Memory::Init();
if (Settings::values.use_cpu_jit) {
@@ -159,7 +151,8 @@ void System::Shutdown() {
Kernel::Shutdown();
HW::Shutdown();
CoreTiming::Shutdown();
- cpu_core.reset();
+ cpu_core = nullptr;
+ app_loader = nullptr;
LOG_DEBUG(Core, "Shutdown OK");
}
diff --git a/src/core/frontend/emu_window.cpp b/src/core/frontend/emu_window.cpp
index 4f0f786ce..6b4637741 100644
--- a/src/core/frontend/emu_window.cpp
+++ b/src/core/frontend/emu_window.cpp
@@ -70,14 +70,12 @@ void EmuWindow::TouchPressed(unsigned framebuffer_x, unsigned framebuffer_y) {
(framebuffer_layout.bottom_screen.bottom - framebuffer_layout.bottom_screen.top);
touch_pressed = true;
- pad_state.touch.Assign(1);
}
void EmuWindow::TouchReleased() {
touch_pressed = false;
touch_x = 0;
touch_y = 0;
- pad_state.touch.Assign(0);
}
void EmuWindow::TouchMoved(unsigned framebuffer_x, unsigned framebuffer_y) {
diff --git a/src/core/hle/service/hid/hid.h b/src/core/hle/service/hid/hid.h
index 21e66dfe0..c7f4ee138 100644
--- a/src/core/hle/service/hid/hid.h
+++ b/src/core/hle/service/hid/hid.h
@@ -42,8 +42,6 @@ struct PadState {
BitField<14, 1, u32> zl;
BitField<15, 1, u32> zr;
- BitField<20, 1, u32> touch;
-
BitField<24, 1, u32> c_right;
BitField<25, 1, u32> c_left;
BitField<26, 1, u32> c_up;
@@ -203,8 +201,6 @@ const PadState PAD_Y = {{1u << 11}};
const PadState PAD_ZL = {{1u << 14}};
const PadState PAD_ZR = {{1u << 15}};
-const PadState PAD_TOUCH = {{1u << 20}};
-
const PadState PAD_C_RIGHT = {{1u << 24}};
const PadState PAD_C_LEFT = {{1u << 25}};
const PadState PAD_C_UP = {{1u << 26}};
diff --git a/src/video_core/shader/shader.cpp b/src/video_core/shader/shader.cpp
index b42fa3cb4..67ed19ba8 100644
--- a/src/video_core/shader/shader.cpp
+++ b/src/video_core/shader/shader.cpp
@@ -40,9 +40,8 @@ OutputVertex OutputVertex::FromAttributeBuffer(const RasterizerRegs& regs, Attri
for (unsigned comp = 0; comp < 4; ++comp) {
RasterizerRegs::VSOutputAttributes::Semantic semantic = semantics[comp];
- float24* out = &vertex_slots[semantic];
if (semantic < vertex_slots.size()) {
- *out = input.attr[i][comp];
+ vertex_slots[semantic] = input.attr[i][comp];
} else if (semantic != RasterizerRegs::VSOutputAttributes::INVALID) {
LOG_ERROR(HW_GPU, "Invalid/unknown semantic id: %u", (unsigned int)semantic);
}