diff options
Diffstat (limited to 'src')
45 files changed, 102 insertions, 34 deletions
diff --git a/src/audio_core/time_stretch.cpp b/src/audio_core/time_stretch.cpp index fc14151da..d72d67994 100644 --- a/src/audio_core/time_stretch.cpp +++ b/src/audio_core/time_stretch.cpp | |||
| @@ -59,7 +59,7 @@ std::size_t TimeStretcher::Process(const s16* in, std::size_t num_in, s16* out, | |||
| 59 | m_stretch_ratio = std::max(m_stretch_ratio, 0.05); | 59 | m_stretch_ratio = std::max(m_stretch_ratio, 0.05); |
| 60 | m_sound_touch.setTempo(m_stretch_ratio); | 60 | m_sound_touch.setTempo(m_stretch_ratio); |
| 61 | 61 | ||
| 62 | LOG_DEBUG(Audio, "{:5}/{:5} ratio:{:0.6f} backlog:{:0.6f}", num_in, num_out, m_stretch_ratio, | 62 | LOG_TRACE(Audio, "{:5}/{:5} ratio:{:0.6f} backlog:{:0.6f}", num_in, num_out, m_stretch_ratio, |
| 63 | backlog_fullness); | 63 | backlog_fullness); |
| 64 | 64 | ||
| 65 | m_sound_touch.putSamples(in, static_cast<u32>(num_in)); | 65 | m_sound_touch.putSamples(in, static_cast<u32>(num_in)); |
diff --git a/src/common/ring_buffer.h b/src/common/ring_buffer.h index 45926c9ec..abe3b4dc2 100644 --- a/src/common/ring_buffer.h +++ b/src/common/ring_buffer.h | |||
| @@ -9,6 +9,7 @@ | |||
| 9 | #include <atomic> | 9 | #include <atomic> |
| 10 | #include <cstddef> | 10 | #include <cstddef> |
| 11 | #include <cstring> | 11 | #include <cstring> |
| 12 | #include <new> | ||
| 12 | #include <type_traits> | 13 | #include <type_traits> |
| 13 | #include <vector> | 14 | #include <vector> |
| 14 | #include "common/common_types.h" | 15 | #include "common/common_types.h" |
| @@ -29,7 +30,7 @@ class RingBuffer { | |||
| 29 | static_assert(capacity < std::numeric_limits<std::size_t>::max() / 2 / granularity); | 30 | static_assert(capacity < std::numeric_limits<std::size_t>::max() / 2 / granularity); |
| 30 | static_assert((capacity & (capacity - 1)) == 0, "capacity must be a power of two"); | 31 | static_assert((capacity & (capacity - 1)) == 0, "capacity must be a power of two"); |
| 31 | // Ensure lock-free. | 32 | // Ensure lock-free. |
| 32 | static_assert(std::atomic<std::size_t>::is_always_lock_free); | 33 | static_assert(std::atomic_size_t::is_always_lock_free); |
| 33 | 34 | ||
| 34 | public: | 35 | public: |
| 35 | /// Pushes slots into the ring buffer | 36 | /// Pushes slots into the ring buffer |
| @@ -102,8 +103,15 @@ public: | |||
| 102 | private: | 103 | private: |
| 103 | // It is important to align the below variables for performance reasons: | 104 | // It is important to align the below variables for performance reasons: |
| 104 | // Having them on the same cache-line would result in false-sharing between them. | 105 | // Having them on the same cache-line would result in false-sharing between them. |
| 105 | alignas(128) std::atomic<std::size_t> m_read_index{0}; | 106 | // TODO: Remove this ifdef whenever clang and GCC support |
| 106 | alignas(128) std::atomic<std::size_t> m_write_index{0}; | 107 | // std::hardware_destructive_interference_size. |
| 108 | #if defined(_MSC_VER) && _MSC_VER >= 1911 | ||
| 109 | alignas(std::hardware_destructive_interference_size) std::atomic_size_t m_read_index{0}; | ||
| 110 | alignas(std::hardware_destructive_interference_size) std::atomic_size_t m_write_index{0}; | ||
| 111 | #else | ||
| 112 | alignas(128) std::atomic_size_t m_read_index{0}; | ||
| 113 | alignas(128) std::atomic_size_t m_write_index{0}; | ||
| 114 | #endif | ||
| 107 | 115 | ||
| 108 | std::array<T, granularity * capacity> m_data; | 116 | std::array<T, granularity * capacity> m_data; |
| 109 | }; | 117 | }; |
diff --git a/src/core/arm/arm_interface.h b/src/core/arm/arm_interface.h index 867e34932..16d528994 100644 --- a/src/core/arm/arm_interface.h +++ b/src/core/arm/arm_interface.h | |||
| @@ -6,7 +6,10 @@ | |||
| 6 | 6 | ||
| 7 | #include <array> | 7 | #include <array> |
| 8 | #include "common/common_types.h" | 8 | #include "common/common_types.h" |
| 9 | #include "core/hle/kernel/vm_manager.h" | 9 | |
| 10 | namespace Kernel { | ||
| 11 | enum class VMAPermission : u8; | ||
| 12 | } | ||
| 10 | 13 | ||
| 11 | namespace Core { | 14 | namespace Core { |
| 12 | 15 | ||
diff --git a/src/core/arm/dynarmic/arm_dynarmic.cpp b/src/core/arm/dynarmic/arm_dynarmic.cpp index 32cd5746e..7be5a38de 100644 --- a/src/core/arm/dynarmic/arm_dynarmic.cpp +++ b/src/core/arm/dynarmic/arm_dynarmic.cpp | |||
| @@ -15,6 +15,7 @@ | |||
| 15 | #include "core/gdbstub/gdbstub.h" | 15 | #include "core/gdbstub/gdbstub.h" |
| 16 | #include "core/hle/kernel/process.h" | 16 | #include "core/hle/kernel/process.h" |
| 17 | #include "core/hle/kernel/svc.h" | 17 | #include "core/hle/kernel/svc.h" |
| 18 | #include "core/hle/kernel/vm_manager.h" | ||
| 18 | #include "core/memory.h" | 19 | #include "core/memory.h" |
| 19 | 20 | ||
| 20 | namespace Core { | 21 | namespace Core { |
diff --git a/src/core/arm/dynarmic/arm_dynarmic.h b/src/core/arm/dynarmic/arm_dynarmic.h index e61382d3d..4ee92ee27 100644 --- a/src/core/arm/dynarmic/arm_dynarmic.h +++ b/src/core/arm/dynarmic/arm_dynarmic.h | |||
| @@ -12,6 +12,10 @@ | |||
| 12 | #include "core/arm/exclusive_monitor.h" | 12 | #include "core/arm/exclusive_monitor.h" |
| 13 | #include "core/arm/unicorn/arm_unicorn.h" | 13 | #include "core/arm/unicorn/arm_unicorn.h" |
| 14 | 14 | ||
| 15 | namespace Memory { | ||
| 16 | struct PageTable; | ||
| 17 | } | ||
| 18 | |||
| 15 | namespace Core { | 19 | namespace Core { |
| 16 | 20 | ||
| 17 | class ARM_Dynarmic_Callbacks; | 21 | class ARM_Dynarmic_Callbacks; |
diff --git a/src/core/file_sys/content_archive.cpp b/src/core/file_sys/content_archive.cpp index 45fc0b574..aa1b3c17d 100644 --- a/src/core/file_sys/content_archive.cpp +++ b/src/core/file_sys/content_archive.cpp | |||
| @@ -463,6 +463,8 @@ NCA::NCA(VirtualFile file_, VirtualFile bktr_base_romfs_, u64 bktr_base_ivfc_off | |||
| 463 | status = Loader::ResultStatus::Success; | 463 | status = Loader::ResultStatus::Success; |
| 464 | } | 464 | } |
| 465 | 465 | ||
| 466 | NCA::~NCA() = default; | ||
| 467 | |||
| 466 | Loader::ResultStatus NCA::GetStatus() const { | 468 | Loader::ResultStatus NCA::GetStatus() const { |
| 467 | return status; | 469 | return status; |
| 468 | } | 470 | } |
diff --git a/src/core/file_sys/content_archive.h b/src/core/file_sys/content_archive.h index 00eca52da..f9f66cae9 100644 --- a/src/core/file_sys/content_archive.h +++ b/src/core/file_sys/content_archive.h | |||
| @@ -81,6 +81,8 @@ class NCA : public ReadOnlyVfsDirectory { | |||
| 81 | public: | 81 | public: |
| 82 | explicit NCA(VirtualFile file, VirtualFile bktr_base_romfs = nullptr, | 82 | explicit NCA(VirtualFile file, VirtualFile bktr_base_romfs = nullptr, |
| 83 | u64 bktr_base_ivfc_offset = 0); | 83 | u64 bktr_base_ivfc_offset = 0); |
| 84 | ~NCA() override; | ||
| 85 | |||
| 84 | Loader::ResultStatus GetStatus() const; | 86 | Loader::ResultStatus GetStatus() const; |
| 85 | 87 | ||
| 86 | std::vector<std::shared_ptr<VfsFile>> GetFiles() const override; | 88 | std::vector<std::shared_ptr<VfsFile>> GetFiles() const override; |
diff --git a/src/core/file_sys/control_metadata.cpp b/src/core/file_sys/control_metadata.cpp index f11b91399..5b1177a03 100644 --- a/src/core/file_sys/control_metadata.cpp +++ b/src/core/file_sys/control_metadata.cpp | |||
| @@ -28,6 +28,8 @@ NACP::NACP(VirtualFile file) : raw(std::make_unique<RawNACP>()) { | |||
| 28 | file->ReadObject(raw.get()); | 28 | file->ReadObject(raw.get()); |
| 29 | } | 29 | } |
| 30 | 30 | ||
| 31 | NACP::~NACP() = default; | ||
| 32 | |||
| 31 | const LanguageEntry& NACP::GetLanguageEntry(Language language) const { | 33 | const LanguageEntry& NACP::GetLanguageEntry(Language language) const { |
| 32 | if (language != Language::Default) { | 34 | if (language != Language::Default) { |
| 33 | return raw->language_entries.at(static_cast<u8>(language)); | 35 | return raw->language_entries.at(static_cast<u8>(language)); |
diff --git a/src/core/file_sys/control_metadata.h b/src/core/file_sys/control_metadata.h index 319bae821..43d6f0719 100644 --- a/src/core/file_sys/control_metadata.h +++ b/src/core/file_sys/control_metadata.h | |||
| @@ -73,6 +73,8 @@ extern const std::array<const char*, 15> LANGUAGE_NAMES; | |||
| 73 | class NACP { | 73 | class NACP { |
| 74 | public: | 74 | public: |
| 75 | explicit NACP(VirtualFile file); | 75 | explicit NACP(VirtualFile file); |
| 76 | ~NACP(); | ||
| 77 | |||
| 76 | const LanguageEntry& GetLanguageEntry(Language language = Language::Default) const; | 78 | const LanguageEntry& GetLanguageEntry(Language language = Language::Default) const; |
| 77 | std::string GetApplicationName(Language language = Language::Default) const; | 79 | std::string GetApplicationName(Language language = Language::Default) const; |
| 78 | std::string GetDeveloperName(Language language = Language::Default) const; | 80 | std::string GetDeveloperName(Language language = Language::Default) const; |
diff --git a/src/core/file_sys/nca_metadata.cpp b/src/core/file_sys/nca_metadata.cpp index 479916b69..6f34b7836 100644 --- a/src/core/file_sys/nca_metadata.cpp +++ b/src/core/file_sys/nca_metadata.cpp | |||
| @@ -51,6 +51,8 @@ CNMT::CNMT(CNMTHeader header, OptionalHeader opt_header, std::vector<ContentReco | |||
| 51 | : header(std::move(header)), opt_header(std::move(opt_header)), | 51 | : header(std::move(header)), opt_header(std::move(opt_header)), |
| 52 | content_records(std::move(content_records)), meta_records(std::move(meta_records)) {} | 52 | content_records(std::move(content_records)), meta_records(std::move(meta_records)) {} |
| 53 | 53 | ||
| 54 | CNMT::~CNMT() = default; | ||
| 55 | |||
| 54 | u64 CNMT::GetTitleID() const { | 56 | u64 CNMT::GetTitleID() const { |
| 55 | return header.title_id; | 57 | return header.title_id; |
| 56 | } | 58 | } |
diff --git a/src/core/file_sys/nca_metadata.h b/src/core/file_sys/nca_metadata.h index da5a8dbe8..a05d155f4 100644 --- a/src/core/file_sys/nca_metadata.h +++ b/src/core/file_sys/nca_metadata.h | |||
| @@ -87,6 +87,7 @@ public: | |||
| 87 | explicit CNMT(VirtualFile file); | 87 | explicit CNMT(VirtualFile file); |
| 88 | CNMT(CNMTHeader header, OptionalHeader opt_header, std::vector<ContentRecord> content_records, | 88 | CNMT(CNMTHeader header, OptionalHeader opt_header, std::vector<ContentRecord> content_records, |
| 89 | std::vector<MetaRecord> meta_records); | 89 | std::vector<MetaRecord> meta_records); |
| 90 | ~CNMT(); | ||
| 90 | 91 | ||
| 91 | u64 GetTitleID() const; | 92 | u64 GetTitleID() const; |
| 92 | u32 GetTitleVersion() const; | 93 | u32 GetTitleVersion() const; |
diff --git a/src/core/file_sys/partition_filesystem.cpp b/src/core/file_sys/partition_filesystem.cpp index f5b3b0175..5791c76ff 100644 --- a/src/core/file_sys/partition_filesystem.cpp +++ b/src/core/file_sys/partition_filesystem.cpp | |||
| @@ -72,6 +72,8 @@ PartitionFilesystem::PartitionFilesystem(std::shared_ptr<VfsFile> file) { | |||
| 72 | status = Loader::ResultStatus::Success; | 72 | status = Loader::ResultStatus::Success; |
| 73 | } | 73 | } |
| 74 | 74 | ||
| 75 | PartitionFilesystem::~PartitionFilesystem() = default; | ||
| 76 | |||
| 75 | Loader::ResultStatus PartitionFilesystem::GetStatus() const { | 77 | Loader::ResultStatus PartitionFilesystem::GetStatus() const { |
| 76 | return status; | 78 | return status; |
| 77 | } | 79 | } |
diff --git a/src/core/file_sys/partition_filesystem.h b/src/core/file_sys/partition_filesystem.h index e80d2456b..739c63a7f 100644 --- a/src/core/file_sys/partition_filesystem.h +++ b/src/core/file_sys/partition_filesystem.h | |||
| @@ -25,6 +25,8 @@ namespace FileSys { | |||
| 25 | class PartitionFilesystem : public ReadOnlyVfsDirectory { | 25 | class PartitionFilesystem : public ReadOnlyVfsDirectory { |
| 26 | public: | 26 | public: |
| 27 | explicit PartitionFilesystem(std::shared_ptr<VfsFile> file); | 27 | explicit PartitionFilesystem(std::shared_ptr<VfsFile> file); |
| 28 | ~PartitionFilesystem() override; | ||
| 29 | |||
| 28 | Loader::ResultStatus GetStatus() const; | 30 | Loader::ResultStatus GetStatus() const; |
| 29 | 31 | ||
| 30 | std::vector<std::shared_ptr<VfsFile>> GetFiles() const override; | 32 | std::vector<std::shared_ptr<VfsFile>> GetFiles() const override; |
diff --git a/src/core/file_sys/patch_manager.cpp b/src/core/file_sys/patch_manager.cpp index b37b4c68b..aebc69d52 100644 --- a/src/core/file_sys/patch_manager.cpp +++ b/src/core/file_sys/patch_manager.cpp | |||
| @@ -41,6 +41,8 @@ std::string FormatPatchTypeName(PatchType type) { | |||
| 41 | 41 | ||
| 42 | PatchManager::PatchManager(u64 title_id) : title_id(title_id) {} | 42 | PatchManager::PatchManager(u64 title_id) : title_id(title_id) {} |
| 43 | 43 | ||
| 44 | PatchManager::~PatchManager() = default; | ||
| 45 | |||
| 44 | VirtualDir PatchManager::PatchExeFS(VirtualDir exefs) const { | 46 | VirtualDir PatchManager::PatchExeFS(VirtualDir exefs) const { |
| 45 | LOG_INFO(Loader, "Patching ExeFS for title_id={:016X}", title_id); | 47 | LOG_INFO(Loader, "Patching ExeFS for title_id={:016X}", title_id); |
| 46 | 48 | ||
diff --git a/src/core/file_sys/patch_manager.h b/src/core/file_sys/patch_manager.h index b521977b2..209cab1dc 100644 --- a/src/core/file_sys/patch_manager.h +++ b/src/core/file_sys/patch_manager.h | |||
| @@ -34,6 +34,7 @@ std::string FormatPatchTypeName(PatchType type); | |||
| 34 | class PatchManager { | 34 | class PatchManager { |
| 35 | public: | 35 | public: |
| 36 | explicit PatchManager(u64 title_id); | 36 | explicit PatchManager(u64 title_id); |
| 37 | ~PatchManager(); | ||
| 37 | 38 | ||
| 38 | // Currently tracked ExeFS patches: | 39 | // Currently tracked ExeFS patches: |
| 39 | // - Game Updates | 40 | // - Game Updates |
diff --git a/src/core/file_sys/program_metadata.cpp b/src/core/file_sys/program_metadata.cpp index 9d19aaa6d..02319ce0f 100644 --- a/src/core/file_sys/program_metadata.cpp +++ b/src/core/file_sys/program_metadata.cpp | |||
| @@ -12,6 +12,10 @@ | |||
| 12 | 12 | ||
| 13 | namespace FileSys { | 13 | namespace FileSys { |
| 14 | 14 | ||
| 15 | ProgramMetadata::ProgramMetadata() = default; | ||
| 16 | |||
| 17 | ProgramMetadata::~ProgramMetadata() = default; | ||
| 18 | |||
| 15 | Loader::ResultStatus ProgramMetadata::Load(VirtualFile file) { | 19 | Loader::ResultStatus ProgramMetadata::Load(VirtualFile file) { |
| 16 | std::size_t total_size = static_cast<std::size_t>(file->GetSize()); | 20 | std::size_t total_size = static_cast<std::size_t>(file->GetSize()); |
| 17 | if (total_size < sizeof(Header)) | 21 | if (total_size < sizeof(Header)) |
diff --git a/src/core/file_sys/program_metadata.h b/src/core/file_sys/program_metadata.h index 3c0a49f16..1143e36c4 100644 --- a/src/core/file_sys/program_metadata.h +++ b/src/core/file_sys/program_metadata.h | |||
| @@ -36,6 +36,9 @@ enum class ProgramFilePermission : u64 { | |||
| 36 | */ | 36 | */ |
| 37 | class ProgramMetadata { | 37 | class ProgramMetadata { |
| 38 | public: | 38 | public: |
| 39 | ProgramMetadata(); | ||
| 40 | ~ProgramMetadata(); | ||
| 41 | |||
| 39 | Loader::ResultStatus Load(VirtualFile file); | 42 | Loader::ResultStatus Load(VirtualFile file); |
| 40 | 43 | ||
| 41 | bool Is64BitProgram() const; | 44 | bool Is64BitProgram() const; |
diff --git a/src/core/file_sys/romfs_factory.cpp b/src/core/file_sys/romfs_factory.cpp index d9d90939e..3d1a3685e 100644 --- a/src/core/file_sys/romfs_factory.cpp +++ b/src/core/file_sys/romfs_factory.cpp | |||
| @@ -28,6 +28,8 @@ RomFSFactory::RomFSFactory(Loader::AppLoader& app_loader) { | |||
| 28 | ivfc_offset = app_loader.ReadRomFSIVFCOffset(); | 28 | ivfc_offset = app_loader.ReadRomFSIVFCOffset(); |
| 29 | } | 29 | } |
| 30 | 30 | ||
| 31 | RomFSFactory::~RomFSFactory() = default; | ||
| 32 | |||
| 31 | ResultVal<VirtualFile> RomFSFactory::OpenCurrentProcess() { | 33 | ResultVal<VirtualFile> RomFSFactory::OpenCurrentProcess() { |
| 32 | if (!updatable) | 34 | if (!updatable) |
| 33 | return MakeResult<VirtualFile>(file); | 35 | return MakeResult<VirtualFile>(file); |
diff --git a/src/core/file_sys/romfs_factory.h b/src/core/file_sys/romfs_factory.h index 26b8f46cc..2cace8180 100644 --- a/src/core/file_sys/romfs_factory.h +++ b/src/core/file_sys/romfs_factory.h | |||
| @@ -30,6 +30,7 @@ enum class StorageId : u8 { | |||
| 30 | class RomFSFactory { | 30 | class RomFSFactory { |
| 31 | public: | 31 | public: |
| 32 | explicit RomFSFactory(Loader::AppLoader& app_loader); | 32 | explicit RomFSFactory(Loader::AppLoader& app_loader); |
| 33 | ~RomFSFactory(); | ||
| 33 | 34 | ||
| 34 | ResultVal<VirtualFile> OpenCurrentProcess(); | 35 | ResultVal<VirtualFile> OpenCurrentProcess(); |
| 35 | ResultVal<VirtualFile> Open(u64 title_id, StorageId storage, ContentRecordType type); | 36 | ResultVal<VirtualFile> Open(u64 title_id, StorageId storage, ContentRecordType type); |
diff --git a/src/core/file_sys/savedata_factory.cpp b/src/core/file_sys/savedata_factory.cpp index cddb014fc..9b2c51bbd 100644 --- a/src/core/file_sys/savedata_factory.cpp +++ b/src/core/file_sys/savedata_factory.cpp | |||
| @@ -20,6 +20,8 @@ std::string SaveDataDescriptor::DebugInfo() const { | |||
| 20 | 20 | ||
| 21 | SaveDataFactory::SaveDataFactory(VirtualDir save_directory) : dir(std::move(save_directory)) {} | 21 | SaveDataFactory::SaveDataFactory(VirtualDir save_directory) : dir(std::move(save_directory)) {} |
| 22 | 22 | ||
| 23 | SaveDataFactory::~SaveDataFactory() = default; | ||
| 24 | |||
| 23 | ResultVal<VirtualDir> SaveDataFactory::Open(SaveDataSpaceId space, SaveDataDescriptor meta) { | 25 | ResultVal<VirtualDir> SaveDataFactory::Open(SaveDataSpaceId space, SaveDataDescriptor meta) { |
| 24 | if (meta.type == SaveDataType::SystemSaveData || meta.type == SaveDataType::SaveData) { | 26 | if (meta.type == SaveDataType::SystemSaveData || meta.type == SaveDataType::SaveData) { |
| 25 | if (meta.zero_1 != 0) { | 27 | if (meta.zero_1 != 0) { |
diff --git a/src/core/file_sys/savedata_factory.h b/src/core/file_sys/savedata_factory.h index ba978695b..d69ef6741 100644 --- a/src/core/file_sys/savedata_factory.h +++ b/src/core/file_sys/savedata_factory.h | |||
| @@ -48,6 +48,7 @@ static_assert(sizeof(SaveDataDescriptor) == 0x40, "SaveDataDescriptor has incorr | |||
| 48 | class SaveDataFactory { | 48 | class SaveDataFactory { |
| 49 | public: | 49 | public: |
| 50 | explicit SaveDataFactory(VirtualDir dir); | 50 | explicit SaveDataFactory(VirtualDir dir); |
| 51 | ~SaveDataFactory(); | ||
| 51 | 52 | ||
| 52 | ResultVal<VirtualDir> Open(SaveDataSpaceId space, SaveDataDescriptor meta); | 53 | ResultVal<VirtualDir> Open(SaveDataSpaceId space, SaveDataDescriptor meta); |
| 53 | 54 | ||
diff --git a/src/core/file_sys/submission_package.h b/src/core/file_sys/submission_package.h index 1120a4920..e85a2b76e 100644 --- a/src/core/file_sys/submission_package.h +++ b/src/core/file_sys/submission_package.h | |||
| @@ -24,7 +24,7 @@ enum class ContentRecordType : u8; | |||
| 24 | class NSP : public ReadOnlyVfsDirectory { | 24 | class NSP : public ReadOnlyVfsDirectory { |
| 25 | public: | 25 | public: |
| 26 | explicit NSP(VirtualFile file); | 26 | explicit NSP(VirtualFile file); |
| 27 | ~NSP(); | 27 | ~NSP() override; |
| 28 | 28 | ||
| 29 | Loader::ResultStatus GetStatus() const; | 29 | Loader::ResultStatus GetStatus() const; |
| 30 | Loader::ResultStatus GetProgramStatus(u64 title_id) const; | 30 | Loader::ResultStatus GetProgramStatus(u64 title_id) const; |
diff --git a/src/core/file_sys/vfs_concat.cpp b/src/core/file_sys/vfs_concat.cpp index 25a980cbb..dc7a279a9 100644 --- a/src/core/file_sys/vfs_concat.cpp +++ b/src/core/file_sys/vfs_concat.cpp | |||
| @@ -27,6 +27,8 @@ ConcatenatedVfsFile::ConcatenatedVfsFile(std::vector<VirtualFile> files_, std::s | |||
| 27 | } | 27 | } |
| 28 | } | 28 | } |
| 29 | 29 | ||
| 30 | ConcatenatedVfsFile::~ConcatenatedVfsFile() = default; | ||
| 31 | |||
| 30 | std::string ConcatenatedVfsFile::GetName() const { | 32 | std::string ConcatenatedVfsFile::GetName() const { |
| 31 | if (files.empty()) | 33 | if (files.empty()) |
| 32 | return ""; | 34 | return ""; |
diff --git a/src/core/file_sys/vfs_concat.h b/src/core/file_sys/vfs_concat.h index 31775db7e..717d04bdc 100644 --- a/src/core/file_sys/vfs_concat.h +++ b/src/core/file_sys/vfs_concat.h | |||
| @@ -22,6 +22,8 @@ class ConcatenatedVfsFile : public VfsFile { | |||
| 22 | ConcatenatedVfsFile(std::vector<VirtualFile> files, std::string name); | 22 | ConcatenatedVfsFile(std::vector<VirtualFile> files, std::string name); |
| 23 | 23 | ||
| 24 | public: | 24 | public: |
| 25 | ~ConcatenatedVfsFile() override; | ||
| 26 | |||
| 25 | std::string GetName() const override; | 27 | std::string GetName() const override; |
| 26 | std::size_t GetSize() const override; | 28 | std::size_t GetSize() const override; |
| 27 | bool Resize(std::size_t new_size) override; | 29 | bool Resize(std::size_t new_size) override; |
diff --git a/src/core/file_sys/vfs_offset.cpp b/src/core/file_sys/vfs_offset.cpp index f5ed291ea..a4c6719a0 100644 --- a/src/core/file_sys/vfs_offset.cpp +++ b/src/core/file_sys/vfs_offset.cpp | |||
| @@ -14,6 +14,8 @@ OffsetVfsFile::OffsetVfsFile(std::shared_ptr<VfsFile> file_, std::size_t size_, | |||
| 14 | : file(file_), offset(offset_), size(size_), name(std::move(name_)), | 14 | : file(file_), offset(offset_), size(size_), name(std::move(name_)), |
| 15 | parent(parent_ == nullptr ? file->GetContainingDirectory() : std::move(parent_)) {} | 15 | parent(parent_ == nullptr ? file->GetContainingDirectory() : std::move(parent_)) {} |
| 16 | 16 | ||
| 17 | OffsetVfsFile::~OffsetVfsFile() = default; | ||
| 18 | |||
| 17 | std::string OffsetVfsFile::GetName() const { | 19 | std::string OffsetVfsFile::GetName() const { |
| 18 | return name.empty() ? file->GetName() : name; | 20 | return name.empty() ? file->GetName() : name; |
| 19 | } | 21 | } |
diff --git a/src/core/file_sys/vfs_offset.h b/src/core/file_sys/vfs_offset.h index 34cb180b3..8062702a7 100644 --- a/src/core/file_sys/vfs_offset.h +++ b/src/core/file_sys/vfs_offset.h | |||
| @@ -19,6 +19,7 @@ class OffsetVfsFile : public VfsFile { | |||
| 19 | public: | 19 | public: |
| 20 | OffsetVfsFile(std::shared_ptr<VfsFile> file, std::size_t size, std::size_t offset = 0, | 20 | OffsetVfsFile(std::shared_ptr<VfsFile> file, std::size_t size, std::size_t offset = 0, |
| 21 | std::string new_name = "", VirtualDir new_parent = nullptr); | 21 | std::string new_name = "", VirtualDir new_parent = nullptr); |
| 22 | ~OffsetVfsFile() override; | ||
| 22 | 23 | ||
| 23 | std::string GetName() const override; | 24 | std::string GetName() const override; |
| 24 | std::size_t GetSize() const override; | 25 | std::size_t GetSize() const override; |
diff --git a/src/core/file_sys/vfs_vector.cpp b/src/core/file_sys/vfs_vector.cpp index 98e7c4598..ec7f735b5 100644 --- a/src/core/file_sys/vfs_vector.cpp +++ b/src/core/file_sys/vfs_vector.cpp | |||
| @@ -13,6 +13,8 @@ VectorVfsDirectory::VectorVfsDirectory(std::vector<VirtualFile> files_, | |||
| 13 | : files(std::move(files_)), dirs(std::move(dirs_)), parent(std::move(parent_)), | 13 | : files(std::move(files_)), dirs(std::move(dirs_)), parent(std::move(parent_)), |
| 14 | name(std::move(name_)) {} | 14 | name(std::move(name_)) {} |
| 15 | 15 | ||
| 16 | VectorVfsDirectory::~VectorVfsDirectory() = default; | ||
| 17 | |||
| 16 | std::vector<std::shared_ptr<VfsFile>> VectorVfsDirectory::GetFiles() const { | 18 | std::vector<std::shared_ptr<VfsFile>> VectorVfsDirectory::GetFiles() const { |
| 17 | return files; | 19 | return files; |
| 18 | } | 20 | } |
diff --git a/src/core/file_sys/vfs_vector.h b/src/core/file_sys/vfs_vector.h index 179f62e4b..cba44a7a6 100644 --- a/src/core/file_sys/vfs_vector.h +++ b/src/core/file_sys/vfs_vector.h | |||
| @@ -15,6 +15,7 @@ public: | |||
| 15 | explicit VectorVfsDirectory(std::vector<VirtualFile> files = {}, | 15 | explicit VectorVfsDirectory(std::vector<VirtualFile> files = {}, |
| 16 | std::vector<VirtualDir> dirs = {}, std::string name = "", | 16 | std::vector<VirtualDir> dirs = {}, std::string name = "", |
| 17 | VirtualDir parent = nullptr); | 17 | VirtualDir parent = nullptr); |
| 18 | ~VectorVfsDirectory() override; | ||
| 18 | 19 | ||
| 19 | std::vector<std::shared_ptr<VfsFile>> GetFiles() const override; | 20 | std::vector<std::shared_ptr<VfsFile>> GetFiles() const override; |
| 20 | std::vector<std::shared_ptr<VfsDirectory>> GetSubdirectories() const override; | 21 | std::vector<std::shared_ptr<VfsDirectory>> GetSubdirectories() const override; |
diff --git a/src/core/file_sys/xts_archive.cpp b/src/core/file_sys/xts_archive.cpp index e937d1403..b2b164368 100644 --- a/src/core/file_sys/xts_archive.cpp +++ b/src/core/file_sys/xts_archive.cpp | |||
| @@ -69,6 +69,8 @@ NAX::NAX(VirtualFile file_, std::array<u8, 0x10> nca_id) | |||
| 69 | Common::HexArrayToString(nca_id, false))); | 69 | Common::HexArrayToString(nca_id, false))); |
| 70 | } | 70 | } |
| 71 | 71 | ||
| 72 | NAX::~NAX() = default; | ||
| 73 | |||
| 72 | Loader::ResultStatus NAX::Parse(std::string_view path) { | 74 | Loader::ResultStatus NAX::Parse(std::string_view path) { |
| 73 | if (file->ReadObject(header.get()) != sizeof(NAXHeader)) | 75 | if (file->ReadObject(header.get()) != sizeof(NAXHeader)) |
| 74 | return Loader::ResultStatus::ErrorBadNAXHeader; | 76 | return Loader::ResultStatus::ErrorBadNAXHeader; |
diff --git a/src/core/file_sys/xts_archive.h b/src/core/file_sys/xts_archive.h index 6e2fc4d2e..8fedd8585 100644 --- a/src/core/file_sys/xts_archive.h +++ b/src/core/file_sys/xts_archive.h | |||
| @@ -33,6 +33,7 @@ class NAX : public ReadOnlyVfsDirectory { | |||
| 33 | public: | 33 | public: |
| 34 | explicit NAX(VirtualFile file); | 34 | explicit NAX(VirtualFile file); |
| 35 | explicit NAX(VirtualFile file, std::array<u8, 0x10> nca_id); | 35 | explicit NAX(VirtualFile file, std::array<u8, 0x10> nca_id); |
| 36 | ~NAX() override; | ||
| 36 | 37 | ||
| 37 | Loader::ResultStatus GetStatus() const; | 38 | Loader::ResultStatus GetStatus() const; |
| 38 | 39 | ||
diff --git a/src/core/hle/kernel/mutex.cpp b/src/core/hle/kernel/mutex.cpp index 51f4544be..81675eac5 100644 --- a/src/core/hle/kernel/mutex.cpp +++ b/src/core/hle/kernel/mutex.cpp | |||
| @@ -16,6 +16,7 @@ | |||
| 16 | #include "core/hle/kernel/object.h" | 16 | #include "core/hle/kernel/object.h" |
| 17 | #include "core/hle/kernel/thread.h" | 17 | #include "core/hle/kernel/thread.h" |
| 18 | #include "core/hle/result.h" | 18 | #include "core/hle/result.h" |
| 19 | #include "core/memory.h" | ||
| 19 | 20 | ||
| 20 | namespace Kernel { | 21 | namespace Kernel { |
| 21 | 22 | ||
diff --git a/src/core/hle/kernel/process.cpp b/src/core/hle/kernel/process.cpp index 7a272d031..914bbe0a1 100644 --- a/src/core/hle/kernel/process.cpp +++ b/src/core/hle/kernel/process.cpp | |||
| @@ -125,7 +125,7 @@ void Process::Run(VAddr entry_point, s32 main_thread_priority, u32 stack_size) { | |||
| 125 | vm_manager.LogLayout(); | 125 | vm_manager.LogLayout(); |
| 126 | status = ProcessStatus::Running; | 126 | status = ProcessStatus::Running; |
| 127 | 127 | ||
| 128 | Kernel::SetupMainThread(kernel, entry_point, main_thread_priority, this); | 128 | Kernel::SetupMainThread(kernel, entry_point, main_thread_priority, *this); |
| 129 | } | 129 | } |
| 130 | 130 | ||
| 131 | void Process::LoadModule(SharedPtr<CodeSet> module_, VAddr base_addr) { | 131 | void Process::LoadModule(SharedPtr<CodeSet> module_, VAddr base_addr) { |
diff --git a/src/core/hle/kernel/thread.cpp b/src/core/hle/kernel/thread.cpp index d4183d6e3..c2d7535c9 100644 --- a/src/core/hle/kernel/thread.cpp +++ b/src/core/hle/kernel/thread.cpp | |||
| @@ -311,13 +311,13 @@ void Thread::BoostPriority(u32 priority) { | |||
| 311 | } | 311 | } |
| 312 | 312 | ||
| 313 | SharedPtr<Thread> SetupMainThread(KernelCore& kernel, VAddr entry_point, u32 priority, | 313 | SharedPtr<Thread> SetupMainThread(KernelCore& kernel, VAddr entry_point, u32 priority, |
| 314 | SharedPtr<Process> owner_process) { | 314 | Process& owner_process) { |
| 315 | // Setup page table so we can write to memory | 315 | // Setup page table so we can write to memory |
| 316 | SetCurrentPageTable(&Core::CurrentProcess()->vm_manager.page_table); | 316 | SetCurrentPageTable(&owner_process.vm_manager.page_table); |
| 317 | 317 | ||
| 318 | // Initialize new "main" thread | 318 | // Initialize new "main" thread |
| 319 | auto thread_res = Thread::Create(kernel, "main", entry_point, priority, 0, THREADPROCESSORID_0, | 319 | auto thread_res = Thread::Create(kernel, "main", entry_point, priority, 0, THREADPROCESSORID_0, |
| 320 | Memory::STACK_AREA_VADDR_END, std::move(owner_process)); | 320 | Memory::STACK_AREA_VADDR_END, &owner_process); |
| 321 | 321 | ||
| 322 | SharedPtr<Thread> thread = std::move(thread_res).Unwrap(); | 322 | SharedPtr<Thread> thread = std::move(thread_res).Unwrap(); |
| 323 | 323 | ||
diff --git a/src/core/hle/kernel/thread.h b/src/core/hle/kernel/thread.h index df4748942..91e9b79ec 100644 --- a/src/core/hle/kernel/thread.h +++ b/src/core/hle/kernel/thread.h | |||
| @@ -281,7 +281,7 @@ private: | |||
| 281 | * @return A shared pointer to the main thread | 281 | * @return A shared pointer to the main thread |
| 282 | */ | 282 | */ |
| 283 | SharedPtr<Thread> SetupMainThread(KernelCore& kernel, VAddr entry_point, u32 priority, | 283 | SharedPtr<Thread> SetupMainThread(KernelCore& kernel, VAddr entry_point, u32 priority, |
| 284 | SharedPtr<Process> owner_process); | 284 | Process& owner_process); |
| 285 | 285 | ||
| 286 | /** | 286 | /** |
| 287 | * Gets the current thread | 287 | * Gets the current thread |
diff --git a/src/core/hle/service/nifm/nifm.cpp b/src/core/hle/service/nifm/nifm.cpp index b6075f256..10611ed6a 100644 --- a/src/core/hle/service/nifm/nifm.cpp +++ b/src/core/hle/service/nifm/nifm.cpp | |||
| @@ -31,7 +31,7 @@ public: | |||
| 31 | {1, &IRequest::GetResult, "GetResult"}, | 31 | {1, &IRequest::GetResult, "GetResult"}, |
| 32 | {2, &IRequest::GetSystemEventReadableHandles, "GetSystemEventReadableHandles"}, | 32 | {2, &IRequest::GetSystemEventReadableHandles, "GetSystemEventReadableHandles"}, |
| 33 | {3, &IRequest::Cancel, "Cancel"}, | 33 | {3, &IRequest::Cancel, "Cancel"}, |
| 34 | {4, nullptr, "Submit"}, | 34 | {4, &IRequest::Submit, "Submit"}, |
| 35 | {5, nullptr, "SetRequirement"}, | 35 | {5, nullptr, "SetRequirement"}, |
| 36 | {6, nullptr, "SetRequirementPreset"}, | 36 | {6, nullptr, "SetRequirementPreset"}, |
| 37 | {8, nullptr, "SetPriority"}, | 37 | {8, nullptr, "SetPriority"}, |
| @@ -61,11 +61,17 @@ public: | |||
| 61 | } | 61 | } |
| 62 | 62 | ||
| 63 | private: | 63 | private: |
| 64 | void Submit(Kernel::HLERequestContext& ctx) { | ||
| 65 | LOG_WARNING(Service_NIFM, "(STUBBED) called"); | ||
| 66 | IPC::ResponseBuilder rb{ctx, 2}; | ||
| 67 | rb.Push(RESULT_SUCCESS); | ||
| 68 | } | ||
| 69 | |||
| 64 | void GetRequestState(Kernel::HLERequestContext& ctx) { | 70 | void GetRequestState(Kernel::HLERequestContext& ctx) { |
| 65 | LOG_WARNING(Service_NIFM, "(STUBBED) called"); | 71 | LOG_WARNING(Service_NIFM, "(STUBBED) called"); |
| 66 | IPC::ResponseBuilder rb{ctx, 3}; | 72 | IPC::ResponseBuilder rb{ctx, 3}; |
| 67 | rb.Push(RESULT_SUCCESS); | 73 | rb.Push(RESULT_SUCCESS); |
| 68 | rb.Push<u32>(3); | 74 | rb.Push<u32>(0); |
| 69 | } | 75 | } |
| 70 | 76 | ||
| 71 | void GetResult(Kernel::HLERequestContext& ctx) { | 77 | void GetResult(Kernel::HLERequestContext& ctx) { |
diff --git a/src/core/loader/nso.cpp b/src/core/loader/nso.cpp index 3c6306818..78a4438c4 100644 --- a/src/core/loader/nso.cpp +++ b/src/core/loader/nso.cpp | |||
| @@ -32,11 +32,18 @@ static_assert(sizeof(NsoSegmentHeader) == 0x10, "NsoSegmentHeader has incorrect | |||
| 32 | 32 | ||
| 33 | struct NsoHeader { | 33 | struct NsoHeader { |
| 34 | u32_le magic; | 34 | u32_le magic; |
| 35 | INSERT_PADDING_BYTES(0xc); | 35 | u32_le version; |
| 36 | INSERT_PADDING_WORDS(1); | ||
| 37 | u8 flags; | ||
| 36 | std::array<NsoSegmentHeader, 3> segments; // Text, RoData, Data (in that order) | 38 | std::array<NsoSegmentHeader, 3> segments; // Text, RoData, Data (in that order) |
| 37 | u32_le bss_size; | 39 | u32_le bss_size; |
| 38 | INSERT_PADDING_BYTES(0x1c); | 40 | INSERT_PADDING_BYTES(0x1c); |
| 39 | std::array<u32_le, 3> segments_compressed_size; | 41 | std::array<u32_le, 3> segments_compressed_size; |
| 42 | |||
| 43 | bool IsSegmentCompressed(size_t segment_num) const { | ||
| 44 | ASSERT_MSG(segment_num < 3, "Invalid segment {}", segment_num); | ||
| 45 | return ((flags >> segment_num) & 1); | ||
| 46 | } | ||
| 40 | }; | 47 | }; |
| 41 | static_assert(sizeof(NsoHeader) == 0x6c, "NsoHeader has incorrect size."); | 48 | static_assert(sizeof(NsoHeader) == 0x6c, "NsoHeader has incorrect size."); |
| 42 | static_assert(std::is_trivially_copyable_v<NsoHeader>, "NsoHeader isn't trivially copyable."); | 49 | static_assert(std::is_trivially_copyable_v<NsoHeader>, "NsoHeader isn't trivially copyable."); |
| @@ -105,9 +112,11 @@ VAddr AppLoader_NSO::LoadModule(FileSys::VirtualFile file, VAddr load_base) { | |||
| 105 | Kernel::SharedPtr<Kernel::CodeSet> codeset = Kernel::CodeSet::Create(kernel, ""); | 112 | Kernel::SharedPtr<Kernel::CodeSet> codeset = Kernel::CodeSet::Create(kernel, ""); |
| 106 | std::vector<u8> program_image; | 113 | std::vector<u8> program_image; |
| 107 | for (std::size_t i = 0; i < nso_header.segments.size(); ++i) { | 114 | for (std::size_t i = 0; i < nso_header.segments.size(); ++i) { |
| 108 | const std::vector<u8> compressed_data = | 115 | std::vector<u8> data = |
| 109 | file->ReadBytes(nso_header.segments_compressed_size[i], nso_header.segments[i].offset); | 116 | file->ReadBytes(nso_header.segments_compressed_size[i], nso_header.segments[i].offset); |
| 110 | std::vector<u8> data = DecompressSegment(compressed_data, nso_header.segments[i]); | 117 | if (nso_header.IsSegmentCompressed(i)) { |
| 118 | data = DecompressSegment(data, nso_header.segments[i]); | ||
| 119 | } | ||
| 111 | program_image.resize(nso_header.segments[i].location); | 120 | program_image.resize(nso_header.segments[i].location); |
| 112 | program_image.insert(program_image.end(), data.begin(), data.end()); | 121 | program_image.insert(program_image.end(), data.begin(), data.end()); |
| 113 | codeset->segments[i].addr = nso_header.segments[i].location; | 122 | codeset->segments[i].addr = nso_header.segments[i].location; |
diff --git a/src/video_core/renderer_opengl/gl_rasterizer.cpp b/src/video_core/renderer_opengl/gl_rasterizer.cpp index e37acbfac..70fb54507 100644 --- a/src/video_core/renderer_opengl/gl_rasterizer.cpp +++ b/src/video_core/renderer_opengl/gl_rasterizer.cpp | |||
| @@ -383,7 +383,7 @@ void RasterizerOpenGL::Clear() { | |||
| 383 | bool use_stencil{}; | 383 | bool use_stencil{}; |
| 384 | 384 | ||
| 385 | OpenGLState clear_state; | 385 | OpenGLState clear_state; |
| 386 | clear_state.draw.draw_framebuffer = state.draw.draw_framebuffer; | 386 | clear_state.draw.draw_framebuffer = framebuffer.handle; |
| 387 | clear_state.color_mask.red_enabled = regs.clear_buffers.R ? GL_TRUE : GL_FALSE; | 387 | clear_state.color_mask.red_enabled = regs.clear_buffers.R ? GL_TRUE : GL_FALSE; |
| 388 | clear_state.color_mask.green_enabled = regs.clear_buffers.G ? GL_TRUE : GL_FALSE; | 388 | clear_state.color_mask.green_enabled = regs.clear_buffers.G ? GL_TRUE : GL_FALSE; |
| 389 | clear_state.color_mask.blue_enabled = regs.clear_buffers.B ? GL_TRUE : GL_FALSE; | 389 | clear_state.color_mask.blue_enabled = regs.clear_buffers.B ? GL_TRUE : GL_FALSE; |
diff --git a/src/video_core/renderer_opengl/gl_state.cpp b/src/video_core/renderer_opengl/gl_state.cpp index af99132ba..e5173e20a 100644 --- a/src/video_core/renderer_opengl/gl_state.cpp +++ b/src/video_core/renderer_opengl/gl_state.cpp | |||
| @@ -4,6 +4,7 @@ | |||
| 4 | 4 | ||
| 5 | #include <iterator> | 5 | #include <iterator> |
| 6 | #include <glad/glad.h> | 6 | #include <glad/glad.h> |
| 7 | #include "common/assert.h" | ||
| 7 | #include "common/logging/log.h" | 8 | #include "common/logging/log.h" |
| 8 | #include "video_core/renderer_opengl/gl_state.h" | 9 | #include "video_core/renderer_opengl/gl_state.h" |
| 9 | 10 | ||
diff --git a/src/video_core/renderer_opengl/gl_state.h b/src/video_core/renderer_opengl/gl_state.h index e3e24b9e7..9a93029d8 100644 --- a/src/video_core/renderer_opengl/gl_state.h +++ b/src/video_core/renderer_opengl/gl_state.h | |||
| @@ -7,12 +7,8 @@ | |||
| 7 | #include <array> | 7 | #include <array> |
| 8 | #include <glad/glad.h> | 8 | #include <glad/glad.h> |
| 9 | 9 | ||
| 10 | #include "video_core/engines/maxwell_3d.h" | ||
| 11 | |||
| 12 | namespace OpenGL { | 10 | namespace OpenGL { |
| 13 | 11 | ||
| 14 | using Regs = Tegra::Engines::Maxwell3D::Regs; | ||
| 15 | |||
| 16 | namespace TextureUnits { | 12 | namespace TextureUnits { |
| 17 | 13 | ||
| 18 | struct TextureUnit { | 14 | struct TextureUnit { |
diff --git a/src/video_core/renderer_opengl/gl_stream_buffer.cpp b/src/video_core/renderer_opengl/gl_stream_buffer.cpp index 664f3ca20..e409228cc 100644 --- a/src/video_core/renderer_opengl/gl_stream_buffer.cpp +++ b/src/video_core/renderer_opengl/gl_stream_buffer.cpp | |||
| @@ -74,7 +74,7 @@ std::tuple<u8*, GLintptr, bool> OGLStreamBuffer::Map(GLsizeiptr size, GLintptr a | |||
| 74 | } | 74 | } |
| 75 | } | 75 | } |
| 76 | 76 | ||
| 77 | if (invalidate | !persistent) { | 77 | if (invalidate || !persistent) { |
| 78 | GLbitfield flags = GL_MAP_WRITE_BIT | (persistent ? GL_MAP_PERSISTENT_BIT : 0) | | 78 | GLbitfield flags = GL_MAP_WRITE_BIT | (persistent ? GL_MAP_PERSISTENT_BIT : 0) | |
| 79 | (coherent ? GL_MAP_COHERENT_BIT : GL_MAP_FLUSH_EXPLICIT_BIT) | | 79 | (coherent ? GL_MAP_COHERENT_BIT : GL_MAP_FLUSH_EXPLICIT_BIT) | |
| 80 | (invalidate ? GL_MAP_INVALIDATE_BUFFER_BIT : GL_MAP_UNSYNCHRONIZED_BIT); | 80 | (invalidate ? GL_MAP_INVALIDATE_BUFFER_BIT : GL_MAP_UNSYNCHRONIZED_BIT); |
diff --git a/src/yuzu/debugger/wait_tree.cpp b/src/yuzu/debugger/wait_tree.cpp index f2a7e23f0..a3b1fd357 100644 --- a/src/yuzu/debugger/wait_tree.cpp +++ b/src/yuzu/debugger/wait_tree.cpp | |||
| @@ -15,6 +15,7 @@ | |||
| 15 | #include "core/hle/kernel/thread.h" | 15 | #include "core/hle/kernel/thread.h" |
| 16 | #include "core/hle/kernel/timer.h" | 16 | #include "core/hle/kernel/timer.h" |
| 17 | #include "core/hle/kernel/wait_object.h" | 17 | #include "core/hle/kernel/wait_object.h" |
| 18 | #include "core/memory.h" | ||
| 18 | 19 | ||
| 19 | WaitTreeItem::WaitTreeItem() = default; | 20 | WaitTreeItem::WaitTreeItem() = default; |
| 20 | WaitTreeItem::~WaitTreeItem() = default; | 21 | WaitTreeItem::~WaitTreeItem() = default; |
diff --git a/src/yuzu/game_list.cpp b/src/yuzu/game_list.cpp index 3b3b551bb..e8b2f720a 100644 --- a/src/yuzu/game_list.cpp +++ b/src/yuzu/game_list.cpp | |||
| @@ -89,15 +89,7 @@ bool GameList::SearchField::KeyReleaseEater::eventFilter(QObject* obj, QEvent* e | |||
| 89 | } | 89 | } |
| 90 | 90 | ||
| 91 | void GameList::SearchField::setFilterResult(int visible, int total) { | 91 | void GameList::SearchField::setFilterResult(int visible, int total) { |
| 92 | QString result_of_text = tr("of"); | 92 | label_filter_result->setText(tr("%1 of %n result(s)", "", total).arg(visible)); |
| 93 | QString result_text; | ||
| 94 | if (total == 1) { | ||
| 95 | result_text = tr("result"); | ||
| 96 | } else { | ||
| 97 | result_text = tr("results"); | ||
| 98 | } | ||
| 99 | label_filter_result->setText( | ||
| 100 | QString("%1 %2 %3 %4").arg(visible).arg(result_of_text).arg(total).arg(result_text)); | ||
| 101 | } | 93 | } |
| 102 | 94 | ||
| 103 | void GameList::SearchField::clear() { | 95 | void GameList::SearchField::clear() { |
diff --git a/src/yuzu/game_list_p.h b/src/yuzu/game_list_p.h index b6272d536..cee109730 100644 --- a/src/yuzu/game_list_p.h +++ b/src/yuzu/game_list_p.h | |||
| @@ -68,7 +68,7 @@ public: | |||
| 68 | if (!picture.loadFromData(picture_data.data(), static_cast<u32>(picture_data.size()))) { | 68 | if (!picture.loadFromData(picture_data.data(), static_cast<u32>(picture_data.size()))) { |
| 69 | picture = GetDefaultIcon(size); | 69 | picture = GetDefaultIcon(size); |
| 70 | } | 70 | } |
| 71 | picture = picture.scaled(size, size); | 71 | picture = picture.scaled(size, size, Qt::IgnoreAspectRatio, Qt::SmoothTransformation); |
| 72 | 72 | ||
| 73 | setData(picture, Qt::DecorationRole); | 73 | setData(picture, Qt::DecorationRole); |
| 74 | } | 74 | } |
diff --git a/src/yuzu_cmd/config.cpp b/src/yuzu_cmd/config.cpp index 7ec1f5110..a478b0a56 100644 --- a/src/yuzu_cmd/config.cpp +++ b/src/yuzu_cmd/config.cpp | |||
| @@ -120,7 +120,7 @@ void Config::ReadValues() { | |||
| 120 | sdl2_config->Get("Data Storage", "nand_directory", | 120 | sdl2_config->Get("Data Storage", "nand_directory", |
| 121 | FileUtil::GetUserPath(FileUtil::UserPath::NANDDir))); | 121 | FileUtil::GetUserPath(FileUtil::UserPath::NANDDir))); |
| 122 | FileUtil::GetUserPath(FileUtil::UserPath::SDMCDir, | 122 | FileUtil::GetUserPath(FileUtil::UserPath::SDMCDir, |
| 123 | sdl2_config->Get("Data Storage", "nand_directory", | 123 | sdl2_config->Get("Data Storage", "sdmc_directory", |
| 124 | FileUtil::GetUserPath(FileUtil::UserPath::SDMCDir))); | 124 | FileUtil::GetUserPath(FileUtil::UserPath::SDMCDir))); |
| 125 | 125 | ||
| 126 | // System | 126 | // System |
diff --git a/src/yuzu_cmd/yuzu.cpp b/src/yuzu_cmd/yuzu.cpp index b1c364fbb..b2559b717 100644 --- a/src/yuzu_cmd/yuzu.cpp +++ b/src/yuzu_cmd/yuzu.cpp | |||
| @@ -20,8 +20,10 @@ | |||
| 20 | #include "common/string_util.h" | 20 | #include "common/string_util.h" |
| 21 | #include "common/telemetry.h" | 21 | #include "common/telemetry.h" |
| 22 | #include "core/core.h" | 22 | #include "core/core.h" |
| 23 | #include "core/crypto/key_manager.h" | ||
| 23 | #include "core/file_sys/vfs_real.h" | 24 | #include "core/file_sys/vfs_real.h" |
| 24 | #include "core/gdbstub/gdbstub.h" | 25 | #include "core/gdbstub/gdbstub.h" |
| 26 | #include "core/hle/service/filesystem/filesystem.h" | ||
| 25 | #include "core/loader/loader.h" | 27 | #include "core/loader/loader.h" |
| 26 | #include "core/settings.h" | 28 | #include "core/settings.h" |
| 27 | #include "core/telemetry_session.h" | 29 | #include "core/telemetry_session.h" |
| @@ -29,7 +31,6 @@ | |||
| 29 | #include "yuzu_cmd/emu_window/emu_window_sdl2.h" | 31 | #include "yuzu_cmd/emu_window/emu_window_sdl2.h" |
| 30 | 32 | ||
| 31 | #include <getopt.h> | 33 | #include <getopt.h> |
| 32 | #include "core/crypto/key_manager.h" | ||
| 33 | #ifndef _MSC_VER | 34 | #ifndef _MSC_VER |
| 34 | #include <unistd.h> | 35 | #include <unistd.h> |
| 35 | #endif | 36 | #endif |
| @@ -169,6 +170,7 @@ int main(int argc, char** argv) { | |||
| 169 | 170 | ||
| 170 | Core::System& system{Core::System::GetInstance()}; | 171 | Core::System& system{Core::System::GetInstance()}; |
| 171 | system.SetFilesystem(std::make_shared<FileSys::RealVfsFilesystem>()); | 172 | system.SetFilesystem(std::make_shared<FileSys::RealVfsFilesystem>()); |
| 173 | Service::FileSystem::CreateFactories(system.GetFilesystem()); | ||
| 172 | 174 | ||
| 173 | SCOPE_EXIT({ system.Shutdown(); }); | 175 | SCOPE_EXIT({ system.Shutdown(); }); |
| 174 | 176 | ||