summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/audio_core/time_stretch.cpp3
-rw-r--r--src/audio_core/time_stretch.h1
-rw-r--r--src/common/logging/backend.cpp3
-rw-r--r--src/common/logging/log.h2
-rw-r--r--src/core/crypto/key_manager.cpp1
-rw-r--r--src/core/file_sys/vfs.cpp8
-rw-r--r--src/core/hle/service/aoc/aoc_u.cpp6
-rw-r--r--src/core/hle/service/hid/controllers/npad.cpp5
-rw-r--r--src/core/perf_stats.cpp4
-rw-r--r--src/video_core/engines/maxwell_3d.cpp1
-rw-r--r--src/video_core/engines/shader_bytecode.h1
-rw-r--r--src/video_core/renderer_opengl/gl_shader_decompiler.cpp29
-rw-r--r--src/video_core/renderer_opengl/gl_shader_gen.cpp3
-rw-r--r--src/video_core/textures/decoders.cpp1
-rw-r--r--src/yuzu/bootmanager.cpp6
-rw-r--r--src/yuzu/configuration/config.cpp13
-rw-r--r--src/yuzu/configuration/config.h14
-rw-r--r--src/yuzu/debugger/graphics/graphics_breakpoints.cpp33
-rw-r--r--src/yuzu/debugger/graphics/graphics_breakpoints_p.h2
-rw-r--r--src/yuzu/game_list.cpp17
20 files changed, 90 insertions, 63 deletions
diff --git a/src/audio_core/time_stretch.cpp b/src/audio_core/time_stretch.cpp
index d72d67994..cee8b12dd 100644
--- a/src/audio_core/time_stretch.cpp
+++ b/src/audio_core/time_stretch.cpp
@@ -10,8 +10,7 @@
10 10
11namespace AudioCore { 11namespace AudioCore {
12 12
13TimeStretcher::TimeStretcher(u32 sample_rate, u32 channel_count) 13TimeStretcher::TimeStretcher(u32 sample_rate, u32 channel_count) : m_sample_rate{sample_rate} {
14 : m_sample_rate(sample_rate), m_channel_count(channel_count) {
15 m_sound_touch.setChannels(channel_count); 14 m_sound_touch.setChannels(channel_count);
16 m_sound_touch.setSampleRate(sample_rate); 15 m_sound_touch.setSampleRate(sample_rate);
17 m_sound_touch.setPitch(1.0); 16 m_sound_touch.setPitch(1.0);
diff --git a/src/audio_core/time_stretch.h b/src/audio_core/time_stretch.h
index decd760f1..bb2270b96 100644
--- a/src/audio_core/time_stretch.h
+++ b/src/audio_core/time_stretch.h
@@ -27,7 +27,6 @@ public:
27 27
28private: 28private:
29 u32 m_sample_rate; 29 u32 m_sample_rate;
30 u32 m_channel_count;
31 soundtouch::SoundTouch m_sound_touch; 30 soundtouch::SoundTouch m_sound_touch;
32 double m_stretch_ratio = 1.0; 31 double m_stretch_ratio = 1.0;
33}; 32};
diff --git a/src/common/logging/backend.cpp b/src/common/logging/backend.cpp
index 9f5918851..6d5218465 100644
--- a/src/common/logging/backend.cpp
+++ b/src/common/logging/backend.cpp
@@ -196,6 +196,7 @@ void FileBackend::Write(const Entry& entry) {
196 SUB(Service, NFP) \ 196 SUB(Service, NFP) \
197 SUB(Service, NIFM) \ 197 SUB(Service, NIFM) \
198 SUB(Service, NIM) \ 198 SUB(Service, NIM) \
199 SUB(Service, NPNS) \
199 SUB(Service, NS) \ 200 SUB(Service, NS) \
200 SUB(Service, NVDRV) \ 201 SUB(Service, NVDRV) \
201 SUB(Service, PCIE) \ 202 SUB(Service, PCIE) \
@@ -204,10 +205,12 @@ void FileBackend::Write(const Entry& entry) {
204 SUB(Service, PM) \ 205 SUB(Service, PM) \
205 SUB(Service, PREPO) \ 206 SUB(Service, PREPO) \
206 SUB(Service, PSC) \ 207 SUB(Service, PSC) \
208 SUB(Service, PSM) \
207 SUB(Service, SET) \ 209 SUB(Service, SET) \
208 SUB(Service, SM) \ 210 SUB(Service, SM) \
209 SUB(Service, SPL) \ 211 SUB(Service, SPL) \
210 SUB(Service, SSL) \ 212 SUB(Service, SSL) \
213 SUB(Service, TCAP) \
211 SUB(Service, Time) \ 214 SUB(Service, Time) \
212 SUB(Service, USB) \ 215 SUB(Service, USB) \
213 SUB(Service, VI) \ 216 SUB(Service, VI) \
diff --git a/src/common/logging/log.h b/src/common/logging/log.h
index c9161155a..d4ec31ec3 100644
--- a/src/common/logging/log.h
+++ b/src/common/logging/log.h
@@ -83,6 +83,7 @@ enum class Class : ClassType {
83 Service_NFP, ///< The NFP service 83 Service_NFP, ///< The NFP service
84 Service_NIFM, ///< The NIFM (Network interface) service 84 Service_NIFM, ///< The NIFM (Network interface) service
85 Service_NIM, ///< The NIM service 85 Service_NIM, ///< The NIM service
86 Service_NPNS, ///< The NPNS service
86 Service_NS, ///< The NS services 87 Service_NS, ///< The NS services
87 Service_NVDRV, ///< The NVDRV (Nvidia driver) service 88 Service_NVDRV, ///< The NVDRV (Nvidia driver) service
88 Service_PCIE, ///< The PCIe service 89 Service_PCIE, ///< The PCIe service
@@ -96,6 +97,7 @@ enum class Class : ClassType {
96 Service_SM, ///< The SM (Service manager) service 97 Service_SM, ///< The SM (Service manager) service
97 Service_SPL, ///< The SPL service 98 Service_SPL, ///< The SPL service
98 Service_SSL, ///< The SSL service 99 Service_SSL, ///< The SSL service
100 Service_TCAP, ///< The TCAP service.
99 Service_Time, ///< The time service 101 Service_Time, ///< The time service
100 Service_USB, ///< The USB (Universal Serial Bus) service 102 Service_USB, ///< The USB (Universal Serial Bus) service
101 Service_VI, ///< The VI (Video interface) service 103 Service_VI, ///< The VI (Video interface) service
diff --git a/src/core/crypto/key_manager.cpp b/src/core/crypto/key_manager.cpp
index fd0786068..fefc3c747 100644
--- a/src/core/crypto/key_manager.cpp
+++ b/src/core/crypto/key_manager.cpp
@@ -713,7 +713,6 @@ void KeyManager::DeriveBase() {
713 713
714 const auto sbk = GetKey(S128KeyType::SecureBoot); 714 const auto sbk = GetKey(S128KeyType::SecureBoot);
715 const auto tsec = GetKey(S128KeyType::TSEC); 715 const auto tsec = GetKey(S128KeyType::TSEC);
716 const auto master_source = GetKey(S128KeyType::Source, static_cast<u64>(SourceKeyType::Master));
717 716
718 for (size_t i = 0; i < revisions.size(); ++i) { 717 for (size_t i = 0; i < revisions.size(); ++i) {
719 if (!revisions[i]) 718 if (!revisions[i])
diff --git a/src/core/file_sys/vfs.cpp b/src/core/file_sys/vfs.cpp
index bfe50da73..3824c74e0 100644
--- a/src/core/file_sys/vfs.cpp
+++ b/src/core/file_sys/vfs.cpp
@@ -472,10 +472,14 @@ bool VfsRawCopy(const VirtualFile& src, const VirtualFile& dest, std::size_t blo
472 std::vector<u8> temp(std::min(block_size, src->GetSize())); 472 std::vector<u8> temp(std::min(block_size, src->GetSize()));
473 for (std::size_t i = 0; i < src->GetSize(); i += block_size) { 473 for (std::size_t i = 0; i < src->GetSize(); i += block_size) {
474 const auto read = std::min(block_size, src->GetSize() - i); 474 const auto read = std::min(block_size, src->GetSize() - i);
475 const auto block = src->Read(temp.data(), read, i);
476 475
477 if (dest->Write(temp.data(), read, i) != read) 476 if (src->Read(temp.data(), read, i) != read) {
478 return false; 477 return false;
478 }
479
480 if (dest->Write(temp.data(), read, i) != read) {
481 return false;
482 }
479 } 483 }
480 484
481 return true; 485 return true;
diff --git a/src/core/hle/service/aoc/aoc_u.cpp b/src/core/hle/service/aoc/aoc_u.cpp
index 428069df2..54305cf05 100644
--- a/src/core/hle/service/aoc/aoc_u.cpp
+++ b/src/core/hle/service/aoc/aoc_u.cpp
@@ -24,8 +24,8 @@ namespace Service::AOC {
24constexpr u64 DLC_BASE_TITLE_ID_MASK = 0xFFFFFFFFFFFFE000; 24constexpr u64 DLC_BASE_TITLE_ID_MASK = 0xFFFFFFFFFFFFE000;
25constexpr u64 DLC_BASE_TO_AOC_ID = 0x1000; 25constexpr u64 DLC_BASE_TO_AOC_ID = 0x1000;
26 26
27static bool CheckAOCTitleIDMatchesBase(u64 base, u64 aoc) { 27static bool CheckAOCTitleIDMatchesBase(u64 title_id, u64 base) {
28 return (aoc & DLC_BASE_TITLE_ID_MASK) == base; 28 return (title_id & DLC_BASE_TITLE_ID_MASK) == base;
29} 29}
30 30
31static std::vector<u64> AccumulateAOCTitleIDs() { 31static std::vector<u64> AccumulateAOCTitleIDs() {
@@ -74,7 +74,7 @@ void AOC_U::CountAddOnContent(Kernel::HLERequestContext& ctx) {
74 const auto current = Core::System::GetInstance().CurrentProcess()->GetTitleID(); 74 const auto current = Core::System::GetInstance().CurrentProcess()->GetTitleID();
75 rb.Push<u32>(static_cast<u32>( 75 rb.Push<u32>(static_cast<u32>(
76 std::count_if(add_on_content.begin(), add_on_content.end(), 76 std::count_if(add_on_content.begin(), add_on_content.end(),
77 [&current](u64 tid) { return (tid & DLC_BASE_TITLE_ID_MASK) == current; }))); 77 [current](u64 tid) { return CheckAOCTitleIDMatchesBase(tid, current); })));
78} 78}
79 79
80void AOC_U::ListAddOnContent(Kernel::HLERequestContext& ctx) { 80void AOC_U::ListAddOnContent(Kernel::HLERequestContext& ctx) {
diff --git a/src/core/hle/service/hid/controllers/npad.cpp b/src/core/hle/service/hid/controllers/npad.cpp
index b06e65a77..4b4d1324f 100644
--- a/src/core/hle/service/hid/controllers/npad.cpp
+++ b/src/core/hle/service/hid/controllers/npad.cpp
@@ -108,9 +108,10 @@ void Controller_NPad::OnInit() {
108 styleset_changed_event = 108 styleset_changed_event =
109 Kernel::Event::Create(kernel, Kernel::ResetType::OneShot, "npad:NpadStyleSetChanged"); 109 Kernel::Event::Create(kernel, Kernel::ResetType::OneShot, "npad:NpadStyleSetChanged");
110 110
111 if (!IsControllerActivated()) 111 if (!IsControllerActivated()) {
112 return; 112 return;
113 std::size_t controller{}; 113 }
114
114 if (style.raw == 0) { 115 if (style.raw == 0) {
115 // We want to support all controllers 116 // We want to support all controllers
116 style.handheld.Assign(1); 117 style.handheld.Assign(1);
diff --git a/src/core/perf_stats.cpp b/src/core/perf_stats.cpp
index 7d95816fe..c716a462b 100644
--- a/src/core/perf_stats.cpp
+++ b/src/core/perf_stats.cpp
@@ -74,10 +74,6 @@ double PerfStats::GetLastFrameTimeScale() {
74} 74}
75 75
76void FrameLimiter::DoFrameLimiting(microseconds current_system_time_us) { 76void FrameLimiter::DoFrameLimiting(microseconds current_system_time_us) {
77 // Max lag caused by slow frames. Can be adjusted to compensate for too many slow frames. Higher
78 // values increase the time needed to recover and limit framerate again after spikes.
79 constexpr microseconds MAX_LAG_TIME_US = 25000us;
80
81 if (!Settings::values.use_frame_limit) { 77 if (!Settings::values.use_frame_limit) {
82 return; 78 return;
83 } 79 }
diff --git a/src/video_core/engines/maxwell_3d.cpp b/src/video_core/engines/maxwell_3d.cpp
index bca014a4a..78ba29fc1 100644
--- a/src/video_core/engines/maxwell_3d.cpp
+++ b/src/video_core/engines/maxwell_3d.cpp
@@ -155,7 +155,6 @@ void Maxwell3D::ProcessQueryGet() {
155 ASSERT_MSG(regs.query.query_get.unit == Regs::QueryUnit::Crop, 155 ASSERT_MSG(regs.query.query_get.unit == Regs::QueryUnit::Crop,
156 "Units other than CROP are unimplemented"); 156 "Units other than CROP are unimplemented");
157 157
158 u32 value = Memory::Read32(*address);
159 u64 result = 0; 158 u64 result = 0;
160 159
161 // TODO(Subv): Support the other query variables 160 // TODO(Subv): Support the other query variables
diff --git a/src/video_core/engines/shader_bytecode.h b/src/video_core/engines/shader_bytecode.h
index 6cd08d28b..af7756266 100644
--- a/src/video_core/engines/shader_bytecode.h
+++ b/src/video_core/engines/shader_bytecode.h
@@ -79,6 +79,7 @@ union Attribute {
79 constexpr explicit Attribute(u64 value) : value(value) {} 79 constexpr explicit Attribute(u64 value) : value(value) {}
80 80
81 enum class Index : u64 { 81 enum class Index : u64 {
82 PointSize = 6,
82 Position = 7, 83 Position = 7,
83 Attribute_0 = 8, 84 Attribute_0 = 8,
84 Attribute_31 = 39, 85 Attribute_31 = 39,
diff --git a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp
index fe4d1bd83..81ffb24e4 100644
--- a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp
+++ b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp
@@ -6,6 +6,7 @@
6#include <set> 6#include <set>
7#include <string> 7#include <string>
8#include <string_view> 8#include <string_view>
9#include <unordered_set>
9 10
10#include <boost/optional.hpp> 11#include <boost/optional.hpp>
11#include <fmt/format.h> 12#include <fmt/format.h>
@@ -276,7 +277,8 @@ public:
276 GLSLRegisterManager(ShaderWriter& shader, ShaderWriter& declarations, 277 GLSLRegisterManager(ShaderWriter& shader, ShaderWriter& declarations,
277 const Maxwell3D::Regs::ShaderStage& stage, const std::string& suffix, 278 const Maxwell3D::Regs::ShaderStage& stage, const std::string& suffix,
278 const Tegra::Shader::Header& header) 279 const Tegra::Shader::Header& header)
279 : shader{shader}, declarations{declarations}, stage{stage}, suffix{suffix}, header{header} { 280 : shader{shader}, declarations{declarations}, stage{stage}, suffix{suffix}, header{header},
281 fixed_pipeline_output_attributes_used{} {
280 BuildRegisterList(); 282 BuildRegisterList();
281 BuildInputList(); 283 BuildInputList();
282 } 284 }
@@ -480,7 +482,12 @@ public:
480 std::to_string(static_cast<u32>(attribute)) + ']' + 482 std::to_string(static_cast<u32>(attribute)) + ']' +
481 GetSwizzle(elem) + " = " + src + ';'); 483 GetSwizzle(elem) + " = " + src + ';');
482 } else { 484 } else {
483 shader.AddLine(dest + GetSwizzle(elem) + " = " + src + ';'); 485 if (attribute == Attribute::Index::PointSize) {
486 fixed_pipeline_output_attributes_used.insert(attribute);
487 shader.AddLine(dest + " = " + src + ';');
488 } else {
489 shader.AddLine(dest + GetSwizzle(elem) + " = " + src + ';');
490 }
484 } 491 }
485 } 492 }
486 } 493 }
@@ -524,6 +531,7 @@ public:
524 531
525 /// Add declarations. 532 /// Add declarations.
526 void GenerateDeclarations(const std::string& suffix) { 533 void GenerateDeclarations(const std::string& suffix) {
534 GenerateVertex();
527 GenerateRegisters(suffix); 535 GenerateRegisters(suffix);
528 GenerateInternalFlags(); 536 GenerateInternalFlags();
529 GenerateInputAttrs(); 537 GenerateInputAttrs();
@@ -683,6 +691,20 @@ private:
683 declarations.AddNewLine(); 691 declarations.AddNewLine();
684 } 692 }
685 693
694 void GenerateVertex() {
695 if (stage != Maxwell3D::Regs::ShaderStage::Vertex)
696 return;
697 declarations.AddLine("out gl_PerVertex {");
698 ++declarations.scope;
699 declarations.AddLine("vec4 gl_Position;");
700 for (auto& o : fixed_pipeline_output_attributes_used) {
701 if (o == Attribute::Index::PointSize)
702 declarations.AddLine("float gl_PointSize;");
703 }
704 --declarations.scope;
705 declarations.AddLine("};");
706 }
707
686 /// Generates code representing a temporary (GPR) register. 708 /// Generates code representing a temporary (GPR) register.
687 std::string GetRegister(const Register& reg, unsigned elem) { 709 std::string GetRegister(const Register& reg, unsigned elem) {
688 if (reg == Register::ZeroIndex) { 710 if (reg == Register::ZeroIndex) {
@@ -836,6 +858,8 @@ private:
836 /// Generates code representing the declaration name of an output attribute register. 858 /// Generates code representing the declaration name of an output attribute register.
837 std::string GetOutputAttribute(Attribute::Index attribute) { 859 std::string GetOutputAttribute(Attribute::Index attribute) {
838 switch (attribute) { 860 switch (attribute) {
861 case Attribute::Index::PointSize:
862 return "gl_PointSize";
839 case Attribute::Index::Position: 863 case Attribute::Index::Position:
840 return "position"; 864 return "position";
841 default: 865 default:
@@ -870,6 +894,7 @@ private:
870 const Maxwell3D::Regs::ShaderStage& stage; 894 const Maxwell3D::Regs::ShaderStage& stage;
871 const std::string& suffix; 895 const std::string& suffix;
872 const Tegra::Shader::Header& header; 896 const Tegra::Shader::Header& header;
897 std::unordered_set<Attribute::Index> fixed_pipeline_output_attributes_used;
873}; 898};
874 899
875class GLSLGenerator { 900class GLSLGenerator {
diff --git a/src/video_core/renderer_opengl/gl_shader_gen.cpp b/src/video_core/renderer_opengl/gl_shader_gen.cpp
index e883ffb1d..dfb562706 100644
--- a/src/video_core/renderer_opengl/gl_shader_gen.cpp
+++ b/src/video_core/renderer_opengl/gl_shader_gen.cpp
@@ -19,9 +19,6 @@ ProgramResult GenerateVertexShader(const ShaderSetup& setup) {
19 out += Decompiler::GetCommonDeclarations(); 19 out += Decompiler::GetCommonDeclarations();
20 20
21 out += R"( 21 out += R"(
22out gl_PerVertex {
23 vec4 gl_Position;
24};
25 22
26layout (location = 0) out vec4 position; 23layout (location = 0) out vec4 position;
27 24
diff --git a/src/video_core/textures/decoders.cpp b/src/video_core/textures/decoders.cpp
index f1b40e7f5..da7989db9 100644
--- a/src/video_core/textures/decoders.cpp
+++ b/src/video_core/textures/decoders.cpp
@@ -142,7 +142,6 @@ void SwizzledData(u8* swizzled_data, u8* unswizzled_data, const bool unswizzle,
142 const u32 blocks_on_x = div_ceil(width, block_x_elements); 142 const u32 blocks_on_x = div_ceil(width, block_x_elements);
143 const u32 blocks_on_y = div_ceil(height, block_y_elements); 143 const u32 blocks_on_y = div_ceil(height, block_y_elements);
144 const u32 blocks_on_z = div_ceil(depth, block_z_elements); 144 const u32 blocks_on_z = div_ceil(depth, block_z_elements);
145 const u32 blocks = blocks_on_x * blocks_on_y * blocks_on_z;
146 const u32 gob_size = gob_x_bytes * gob_elements_y * gob_elements_z; 145 const u32 gob_size = gob_x_bytes * gob_elements_y * gob_elements_z;
147 const u32 xy_block_size = gob_size * block_height; 146 const u32 xy_block_size = gob_size * block_height;
148 const u32 block_size = xy_block_size * block_depth; 147 const u32 block_size = xy_block_size * block_depth;
diff --git a/src/yuzu/bootmanager.cpp b/src/yuzu/bootmanager.cpp
index e8ab23326..39eef8858 100644
--- a/src/yuzu/bootmanager.cpp
+++ b/src/yuzu/bootmanager.cpp
@@ -8,7 +8,6 @@
8 8
9#include "common/microprofile.h" 9#include "common/microprofile.h"
10#include "common/scm_rev.h" 10#include "common/scm_rev.h"
11#include "common/string_util.h"
12#include "core/core.h" 11#include "core/core.h"
13#include "core/frontend/framebuffer_layout.h" 12#include "core/frontend/framebuffer_layout.h"
14#include "core/settings.h" 13#include "core/settings.h"
@@ -107,9 +106,8 @@ private:
107GRenderWindow::GRenderWindow(QWidget* parent, EmuThread* emu_thread) 106GRenderWindow::GRenderWindow(QWidget* parent, EmuThread* emu_thread)
108 : QWidget(parent), child(nullptr), emu_thread(emu_thread) { 107 : QWidget(parent), child(nullptr), emu_thread(emu_thread) {
109 108
110 std::string window_title = fmt::format("yuzu {} | {}-{}", Common::g_build_name, 109 setWindowTitle(QStringLiteral("yuzu %1 | %2-%3")
111 Common::g_scm_branch, Common::g_scm_desc); 110 .arg(Common::g_build_name, Common::g_scm_branch, Common::g_scm_desc));
112 setWindowTitle(QString::fromStdString(window_title));
113 setAttribute(Qt::WA_AcceptTouchEvents); 111 setAttribute(Qt::WA_AcceptTouchEvents);
114 112
115 InputCommon::Init(); 113 InputCommon::Init();
diff --git a/src/yuzu/configuration/config.cpp b/src/yuzu/configuration/config.cpp
index 1fe9a7edd..d4fd60a73 100644
--- a/src/yuzu/configuration/config.cpp
+++ b/src/yuzu/configuration/config.cpp
@@ -13,11 +13,16 @@ Config::Config() {
13 // TODO: Don't hardcode the path; let the frontend decide where to put the config files. 13 // TODO: Don't hardcode the path; let the frontend decide where to put the config files.
14 qt_config_loc = FileUtil::GetUserPath(FileUtil::UserPath::ConfigDir) + "qt-config.ini"; 14 qt_config_loc = FileUtil::GetUserPath(FileUtil::UserPath::ConfigDir) + "qt-config.ini";
15 FileUtil::CreateFullPath(qt_config_loc); 15 FileUtil::CreateFullPath(qt_config_loc);
16 qt_config = new QSettings(QString::fromStdString(qt_config_loc), QSettings::IniFormat); 16 qt_config =
17 std::make_unique<QSettings>(QString::fromStdString(qt_config_loc), QSettings::IniFormat);
17 18
18 Reload(); 19 Reload();
19} 20}
20 21
22Config::~Config() {
23 Save();
24}
25
21const std::array<int, Settings::NativeButton::NumButtons> Config::default_buttons = { 26const std::array<int, Settings::NativeButton::NumButtons> Config::default_buttons = {
22 Qt::Key_A, Qt::Key_S, Qt::Key_Z, Qt::Key_X, Qt::Key_3, Qt::Key_4, Qt::Key_Q, 27 Qt::Key_A, Qt::Key_S, Qt::Key_Z, Qt::Key_X, Qt::Key_3, Qt::Key_4, Qt::Key_Q,
23 Qt::Key_W, Qt::Key_1, Qt::Key_2, Qt::Key_N, Qt::Key_M, Qt::Key_F, Qt::Key_T, 28 Qt::Key_W, Qt::Key_1, Qt::Key_2, Qt::Key_N, Qt::Key_M, Qt::Key_F, Qt::Key_T,
@@ -342,9 +347,3 @@ void Config::Reload() {
342void Config::Save() { 347void Config::Save() {
343 SaveValues(); 348 SaveValues();
344} 349}
345
346Config::~Config() {
347 Save();
348
349 delete qt_config;
350}
diff --git a/src/yuzu/configuration/config.h b/src/yuzu/configuration/config.h
index cbf745ea2..9c99c1b75 100644
--- a/src/yuzu/configuration/config.h
+++ b/src/yuzu/configuration/config.h
@@ -5,6 +5,7 @@
5#pragma once 5#pragma once
6 6
7#include <array> 7#include <array>
8#include <memory>
8#include <string> 9#include <string>
9#include <QVariant> 10#include <QVariant>
10#include "core/settings.h" 11#include "core/settings.h"
@@ -12,12 +13,6 @@
12class QSettings; 13class QSettings;
13 14
14class Config { 15class Config {
15 QSettings* qt_config;
16 std::string qt_config_loc;
17
18 void ReadValues();
19 void SaveValues();
20
21public: 16public:
22 Config(); 17 Config();
23 ~Config(); 18 ~Config();
@@ -27,4 +22,11 @@ public:
27 22
28 static const std::array<int, Settings::NativeButton::NumButtons> default_buttons; 23 static const std::array<int, Settings::NativeButton::NumButtons> default_buttons;
29 static const std::array<std::array<int, 5>, Settings::NativeAnalog::NumAnalogs> default_analogs; 24 static const std::array<std::array<int, 5>, Settings::NativeAnalog::NumAnalogs> default_analogs;
25
26private:
27 void ReadValues();
28 void SaveValues();
29
30 std::unique_ptr<QSettings> qt_config;
31 std::string qt_config_loc;
30}; 32};
diff --git a/src/yuzu/debugger/graphics/graphics_breakpoints.cpp b/src/yuzu/debugger/graphics/graphics_breakpoints.cpp
index b5c88f944..67ed0ba6d 100644
--- a/src/yuzu/debugger/graphics/graphics_breakpoints.cpp
+++ b/src/yuzu/debugger/graphics/graphics_breakpoints.cpp
@@ -2,7 +2,6 @@
2// Licensed under GPLv2 or any later version 2// Licensed under GPLv2 or any later version
3// Refer to the license.txt file included. 3// Refer to the license.txt file included.
4 4
5#include <map>
6#include <QLabel> 5#include <QLabel>
7#include <QMetaType> 6#include <QMetaType>
8#include <QPushButton> 7#include <QPushButton>
@@ -32,21 +31,8 @@ QVariant BreakPointModel::data(const QModelIndex& index, int role) const {
32 switch (role) { 31 switch (role) {
33 case Qt::DisplayRole: { 32 case Qt::DisplayRole: {
34 if (index.column() == 0) { 33 if (index.column() == 0) {
35 static const std::map<Tegra::DebugContext::Event, QString> map = { 34 return DebugContextEventToString(event);
36 {Tegra::DebugContext::Event::MaxwellCommandLoaded, tr("Maxwell command loaded")},
37 {Tegra::DebugContext::Event::MaxwellCommandProcessed,
38 tr("Maxwell command processed")},
39 {Tegra::DebugContext::Event::IncomingPrimitiveBatch,
40 tr("Incoming primitive batch")},
41 {Tegra::DebugContext::Event::FinishedPrimitiveBatch,
42 tr("Finished primitive batch")},
43 };
44
45 DEBUG_ASSERT(map.size() ==
46 static_cast<std::size_t>(Tegra::DebugContext::Event::NumEvents));
47 return (map.find(event) != map.end()) ? map.at(event) : QString();
48 } 35 }
49
50 break; 36 break;
51 } 37 }
52 38
@@ -128,6 +114,23 @@ void BreakPointModel::OnResumed() {
128 active_breakpoint = context->active_breakpoint; 114 active_breakpoint = context->active_breakpoint;
129} 115}
130 116
117QString BreakPointModel::DebugContextEventToString(Tegra::DebugContext::Event event) {
118 switch (event) {
119 case Tegra::DebugContext::Event::MaxwellCommandLoaded:
120 return tr("Maxwell command loaded");
121 case Tegra::DebugContext::Event::MaxwellCommandProcessed:
122 return tr("Maxwell command processed");
123 case Tegra::DebugContext::Event::IncomingPrimitiveBatch:
124 return tr("Incoming primitive batch");
125 case Tegra::DebugContext::Event::FinishedPrimitiveBatch:
126 return tr("Finished primitive batch");
127 case Tegra::DebugContext::Event::NumEvents:
128 break;
129 }
130
131 return tr("Unknown debug context event");
132}
133
131GraphicsBreakPointsWidget::GraphicsBreakPointsWidget( 134GraphicsBreakPointsWidget::GraphicsBreakPointsWidget(
132 std::shared_ptr<Tegra::DebugContext> debug_context, QWidget* parent) 135 std::shared_ptr<Tegra::DebugContext> debug_context, QWidget* parent)
133 : QDockWidget(tr("Maxwell Breakpoints"), parent), Tegra::DebugContext::BreakPointObserver( 136 : QDockWidget(tr("Maxwell Breakpoints"), parent), Tegra::DebugContext::BreakPointObserver(
diff --git a/src/yuzu/debugger/graphics/graphics_breakpoints_p.h b/src/yuzu/debugger/graphics/graphics_breakpoints_p.h
index 7112b87e6..fb488e38f 100644
--- a/src/yuzu/debugger/graphics/graphics_breakpoints_p.h
+++ b/src/yuzu/debugger/graphics/graphics_breakpoints_p.h
@@ -29,6 +29,8 @@ public:
29 void OnResumed(); 29 void OnResumed();
30 30
31private: 31private:
32 static QString DebugContextEventToString(Tegra::DebugContext::Event event);
33
32 std::weak_ptr<Tegra::DebugContext> context_weak; 34 std::weak_ptr<Tegra::DebugContext> context_weak;
33 bool at_breakpoint; 35 bool at_breakpoint;
34 Tegra::DebugContext::Event active_breakpoint; 36 Tegra::DebugContext::Event active_breakpoint;
diff --git a/src/yuzu/game_list.cpp b/src/yuzu/game_list.cpp
index 67890455a..a5a4aa432 100644
--- a/src/yuzu/game_list.cpp
+++ b/src/yuzu/game_list.cpp
@@ -16,7 +16,6 @@
16#include <fmt/format.h> 16#include <fmt/format.h>
17#include "common/common_paths.h" 17#include "common/common_paths.h"
18#include "common/common_types.h" 18#include "common/common_types.h"
19#include "common/file_util.h"
20#include "common/logging/log.h" 19#include "common/logging/log.h"
21#include "core/file_sys/patch_manager.h" 20#include "core/file_sys/patch_manager.h"
22#include "yuzu/compatibility_list.h" 21#include "yuzu/compatibility_list.h"
@@ -217,11 +216,11 @@ GameList::GameList(FileSys::VirtualFilesystem vfs, GMainWindow* parent)
217 tree_view->setContextMenuPolicy(Qt::CustomContextMenu); 216 tree_view->setContextMenuPolicy(Qt::CustomContextMenu);
218 217
219 item_model->insertColumns(0, COLUMN_COUNT); 218 item_model->insertColumns(0, COLUMN_COUNT);
220 item_model->setHeaderData(COLUMN_NAME, Qt::Horizontal, "Name"); 219 item_model->setHeaderData(COLUMN_NAME, Qt::Horizontal, tr("Name"));
221 item_model->setHeaderData(COLUMN_COMPATIBILITY, Qt::Horizontal, "Compatibility"); 220 item_model->setHeaderData(COLUMN_COMPATIBILITY, Qt::Horizontal, tr("Compatibility"));
222 item_model->setHeaderData(COLUMN_ADD_ONS, Qt::Horizontal, "Add-ons"); 221 item_model->setHeaderData(COLUMN_ADD_ONS, Qt::Horizontal, tr("Add-ons"));
223 item_model->setHeaderData(COLUMN_FILE_TYPE, Qt::Horizontal, "File type"); 222 item_model->setHeaderData(COLUMN_FILE_TYPE, Qt::Horizontal, tr("File type"));
224 item_model->setHeaderData(COLUMN_SIZE, Qt::Horizontal, "Size"); 223 item_model->setHeaderData(COLUMN_SIZE, Qt::Horizontal, tr("Size"));
225 224
226 connect(tree_view, &QTreeView::activated, this, &GameList::ValidateEntry); 225 connect(tree_view, &QTreeView::activated, this, &GameList::ValidateEntry);
227 connect(tree_view, &QTreeView::customContextMenuRequested, this, &GameList::PopupContextMenu); 226 connect(tree_view, &QTreeView::customContextMenuRequested, this, &GameList::PopupContextMenu);
@@ -387,9 +386,9 @@ void GameList::LoadCompatibilityList() {
387} 386}
388 387
389void GameList::PopulateAsync(const QString& dir_path, bool deep_scan) { 388void GameList::PopulateAsync(const QString& dir_path, bool deep_scan) {
390 if (!FileUtil::Exists(dir_path.toStdString()) || 389 const QFileInfo dir_info{dir_path};
391 !FileUtil::IsDirectory(dir_path.toStdString())) { 390 if (!dir_info.exists() || !dir_info.isDir()) {
392 LOG_ERROR(Frontend, "Could not find game list folder at {}", dir_path.toLocal8Bit().data()); 391 LOG_ERROR(Frontend, "Could not find game list folder at {}", dir_path.toStdString());
393 search_field->setFilterResult(0, 0); 392 search_field->setFilterResult(0, 0);
394 return; 393 return;
395 } 394 }