diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/core/crypto/partition_data_manager.cpp | 7 | ||||
| -rw-r--r-- | src/core/hle/service/bcat/backend/boxcat.cpp | 7 | ||||
| -rw-r--r-- | src/core/hle/service/es/es.cpp | 1 | ||||
| -rw-r--r-- | src/tests/core/core_timing.cpp | 18 | ||||
| -rw-r--r-- | src/video_core/engines/fermi_2d.cpp | 2 | ||||
| -rw-r--r-- | src/video_core/shader/control_flow.cpp | 4 | ||||
| -rw-r--r-- | src/video_core/textures/decoders.cpp | 3 | ||||
| -rw-r--r-- | src/video_core/textures/decoders.h | 5 | ||||
| -rw-r--r-- | src/yuzu/applets/profile_select.cpp | 2 |
9 files changed, 25 insertions, 24 deletions
diff --git a/src/core/crypto/partition_data_manager.cpp b/src/core/crypto/partition_data_manager.cpp index d64302f2e..7ed71ac3a 100644 --- a/src/core/crypto/partition_data_manager.cpp +++ b/src/core/crypto/partition_data_manager.cpp | |||
| @@ -202,8 +202,8 @@ static std::array<Key128, 0x20> FindEncryptedMasterKeyFromHex(const std::vector< | |||
| 202 | return out; | 202 | return out; |
| 203 | } | 203 | } |
| 204 | 204 | ||
| 205 | FileSys::VirtualFile FindFileInDirWithNames(const FileSys::VirtualDir& dir, | 205 | static FileSys::VirtualFile FindFileInDirWithNames(const FileSys::VirtualDir& dir, |
| 206 | const std::string& name) { | 206 | const std::string& name) { |
| 207 | const auto upper = Common::ToUpper(name); | 207 | const auto upper = Common::ToUpper(name); |
| 208 | 208 | ||
| 209 | for (const auto& fname : {name, name + ".bin", upper, upper + ".BIN"}) { | 209 | for (const auto& fname : {name, name + ".bin", upper, upper + ".BIN"}) { |
| @@ -345,8 +345,7 @@ FileSys::VirtualFile PartitionDataManager::GetPackage2Raw(Package2Type type) con | |||
| 345 | return package2.at(static_cast<size_t>(type)); | 345 | return package2.at(static_cast<size_t>(type)); |
| 346 | } | 346 | } |
| 347 | 347 | ||
| 348 | bool AttemptDecrypt(const std::array<u8, 16>& key, Package2Header& header) { | 348 | static bool AttemptDecrypt(const std::array<u8, 16>& key, Package2Header& header) { |
| 349 | |||
| 350 | const std::vector<u8> iv(header.header_ctr.begin(), header.header_ctr.end()); | 349 | const std::vector<u8> iv(header.header_ctr.begin(), header.header_ctr.end()); |
| 351 | Package2Header temp = header; | 350 | Package2Header temp = header; |
| 352 | AESCipher<Key128> cipher(key, Mode::CTR); | 351 | AESCipher<Key128> cipher(key, Mode::CTR); |
diff --git a/src/core/hle/service/bcat/backend/boxcat.cpp b/src/core/hle/service/bcat/backend/boxcat.cpp index f589864ee..5febe8fc1 100644 --- a/src/core/hle/service/bcat/backend/boxcat.cpp +++ b/src/core/hle/service/bcat/backend/boxcat.cpp | |||
| @@ -18,6 +18,7 @@ | |||
| 18 | #include "core/hle/service/bcat/backend/boxcat.h" | 18 | #include "core/hle/service/bcat/backend/boxcat.h" |
| 19 | #include "core/settings.h" | 19 | #include "core/settings.h" |
| 20 | 20 | ||
| 21 | namespace Service::BCAT { | ||
| 21 | namespace { | 22 | namespace { |
| 22 | 23 | ||
| 23 | // Prevents conflicts with windows macro called CreateFile | 24 | // Prevents conflicts with windows macro called CreateFile |
| @@ -30,10 +31,6 @@ bool VfsDeleteFileWrap(FileSys::VirtualDir dir, std::string_view name) { | |||
| 30 | return dir->DeleteFile(name); | 31 | return dir->DeleteFile(name); |
| 31 | } | 32 | } |
| 32 | 33 | ||
| 33 | } // Anonymous namespace | ||
| 34 | |||
| 35 | namespace Service::BCAT { | ||
| 36 | |||
| 37 | constexpr ResultCode ERROR_GENERAL_BCAT_FAILURE{ErrorModule::BCAT, 1}; | 34 | constexpr ResultCode ERROR_GENERAL_BCAT_FAILURE{ErrorModule::BCAT, 1}; |
| 38 | 35 | ||
| 39 | constexpr char BOXCAT_HOSTNAME[] = "api.yuzu-emu.org"; | 36 | constexpr char BOXCAT_HOSTNAME[] = "api.yuzu-emu.org"; |
| @@ -90,8 +87,6 @@ constexpr u32 PORT = 443; | |||
| 90 | constexpr u32 TIMEOUT_SECONDS = 30; | 87 | constexpr u32 TIMEOUT_SECONDS = 30; |
| 91 | [[maybe_unused]] constexpr u64 VFS_COPY_BLOCK_SIZE = 1ULL << 24; // 4MB | 88 | [[maybe_unused]] constexpr u64 VFS_COPY_BLOCK_SIZE = 1ULL << 24; // 4MB |
| 92 | 89 | ||
| 93 | namespace { | ||
| 94 | |||
| 95 | std::string GetBINFilePath(u64 title_id) { | 90 | std::string GetBINFilePath(u64 title_id) { |
| 96 | return fmt::format("{}bcat/{:016X}/launchparam.bin", | 91 | return fmt::format("{}bcat/{:016X}/launchparam.bin", |
| 97 | FileUtil::GetUserPath(FileUtil::UserPath::CacheDir), title_id); | 92 | FileUtil::GetUserPath(FileUtil::UserPath::CacheDir), title_id); |
diff --git a/src/core/hle/service/es/es.cpp b/src/core/hle/service/es/es.cpp index df00ae625..1f37bc4d6 100644 --- a/src/core/hle/service/es/es.cpp +++ b/src/core/hle/service/es/es.cpp | |||
| @@ -4,6 +4,7 @@ | |||
| 4 | 4 | ||
| 5 | #include "core/crypto/key_manager.h" | 5 | #include "core/crypto/key_manager.h" |
| 6 | #include "core/hle/ipc_helpers.h" | 6 | #include "core/hle/ipc_helpers.h" |
| 7 | #include "core/hle/service/es/es.h" | ||
| 7 | #include "core/hle/service/service.h" | 8 | #include "core/hle/service/service.h" |
| 8 | 9 | ||
| 9 | namespace Service::ES { | 10 | namespace Service::ES { |
diff --git a/src/tests/core/core_timing.cpp b/src/tests/core/core_timing.cpp index 1e3940801..ff2d11cc8 100644 --- a/src/tests/core/core_timing.cpp +++ b/src/tests/core/core_timing.cpp | |||
| @@ -14,13 +14,14 @@ | |||
| 14 | #include "core/core.h" | 14 | #include "core/core.h" |
| 15 | #include "core/core_timing.h" | 15 | #include "core/core_timing.h" |
| 16 | 16 | ||
| 17 | namespace { | ||
| 17 | // Numbers are chosen randomly to make sure the correct one is given. | 18 | // Numbers are chosen randomly to make sure the correct one is given. |
| 18 | static constexpr std::array<u64, 5> CB_IDS{{42, 144, 93, 1026, UINT64_C(0xFFFF7FFFF7FFFF)}}; | 19 | constexpr std::array<u64, 5> CB_IDS{{42, 144, 93, 1026, UINT64_C(0xFFFF7FFFF7FFFF)}}; |
| 19 | static constexpr int MAX_SLICE_LENGTH = 10000; // Copied from CoreTiming internals | 20 | constexpr int MAX_SLICE_LENGTH = 10000; // Copied from CoreTiming internals |
| 20 | 21 | ||
| 21 | static std::bitset<CB_IDS.size()> callbacks_ran_flags; | 22 | std::bitset<CB_IDS.size()> callbacks_ran_flags; |
| 22 | static u64 expected_callback = 0; | 23 | u64 expected_callback = 0; |
| 23 | static s64 lateness = 0; | 24 | s64 lateness = 0; |
| 24 | 25 | ||
| 25 | template <unsigned int IDX> | 26 | template <unsigned int IDX> |
| 26 | void CallbackTemplate(u64 userdata, s64 cycles_late) { | 27 | void CallbackTemplate(u64 userdata, s64 cycles_late) { |
| @@ -31,7 +32,7 @@ void CallbackTemplate(u64 userdata, s64 cycles_late) { | |||
| 31 | REQUIRE(lateness == cycles_late); | 32 | REQUIRE(lateness == cycles_late); |
| 32 | } | 33 | } |
| 33 | 34 | ||
| 34 | static u64 callbacks_done = 0; | 35 | u64 callbacks_done = 0; |
| 35 | 36 | ||
| 36 | void EmptyCallback(u64 userdata, s64 cycles_late) { | 37 | void EmptyCallback(u64 userdata, s64 cycles_late) { |
| 37 | ++callbacks_done; | 38 | ++callbacks_done; |
| @@ -48,8 +49,8 @@ struct ScopeInit final { | |||
| 48 | Core::Timing::CoreTiming core_timing; | 49 | Core::Timing::CoreTiming core_timing; |
| 49 | }; | 50 | }; |
| 50 | 51 | ||
| 51 | static void AdvanceAndCheck(Core::Timing::CoreTiming& core_timing, u32 idx, u32 context = 0, | 52 | void AdvanceAndCheck(Core::Timing::CoreTiming& core_timing, u32 idx, u32 context = 0, |
| 52 | int expected_lateness = 0, int cpu_downcount = 0) { | 53 | int expected_lateness = 0, int cpu_downcount = 0) { |
| 53 | callbacks_ran_flags = 0; | 54 | callbacks_ran_flags = 0; |
| 54 | expected_callback = CB_IDS[idx]; | 55 | expected_callback = CB_IDS[idx]; |
| 55 | lateness = expected_lateness; | 56 | lateness = expected_lateness; |
| @@ -62,6 +63,7 @@ static void AdvanceAndCheck(Core::Timing::CoreTiming& core_timing, u32 idx, u32 | |||
| 62 | 63 | ||
| 63 | REQUIRE(decltype(callbacks_ran_flags)().set(idx) == callbacks_ran_flags); | 64 | REQUIRE(decltype(callbacks_ran_flags)().set(idx) == callbacks_ran_flags); |
| 64 | } | 65 | } |
| 66 | } // Anonymous namespace | ||
| 65 | 67 | ||
| 66 | TEST_CASE("CoreTiming[BasicOrder]", "[core]") { | 68 | TEST_CASE("CoreTiming[BasicOrder]", "[core]") { |
| 67 | ScopeInit guard; | 69 | ScopeInit guard; |
diff --git a/src/video_core/engines/fermi_2d.cpp b/src/video_core/engines/fermi_2d.cpp index 85d308e26..bace6affb 100644 --- a/src/video_core/engines/fermi_2d.cpp +++ b/src/video_core/engines/fermi_2d.cpp | |||
| @@ -28,7 +28,7 @@ void Fermi2D::CallMethod(const GPU::MethodCall& method_call) { | |||
| 28 | } | 28 | } |
| 29 | } | 29 | } |
| 30 | 30 | ||
| 31 | std::pair<u32, u32> DelimitLine(u32 src_1, u32 src_2, u32 dst_1, u32 dst_2, u32 src_line) { | 31 | static std::pair<u32, u32> DelimitLine(u32 src_1, u32 src_2, u32 dst_1, u32 dst_2, u32 src_line) { |
| 32 | const u32 line_a = src_2 - src_1; | 32 | const u32 line_a = src_2 - src_1; |
| 33 | const u32 line_b = dst_2 - dst_1; | 33 | const u32 line_b = dst_2 - dst_1; |
| 34 | const u32 excess = std::max<s32>(0, line_a - src_line + src_1); | 34 | const u32 excess = std::max<s32>(0, line_a - src_line + src_1); |
diff --git a/src/video_core/shader/control_flow.cpp b/src/video_core/shader/control_flow.cpp index 6d313963a..e00a3fb70 100644 --- a/src/video_core/shader/control_flow.cpp +++ b/src/video_core/shader/control_flow.cpp | |||
| @@ -587,8 +587,6 @@ bool TryQuery(CFGRebuildState& state) { | |||
| 587 | return true; | 587 | return true; |
| 588 | } | 588 | } |
| 589 | 589 | ||
| 590 | } // Anonymous namespace | ||
| 591 | |||
| 592 | void InsertBranch(ASTManager& mm, const BlockBranchInfo& branch_info) { | 590 | void InsertBranch(ASTManager& mm, const BlockBranchInfo& branch_info) { |
| 593 | const auto get_expr = ([&](const Condition& cond) -> Expr { | 591 | const auto get_expr = ([&](const Condition& cond) -> Expr { |
| 594 | Expr result{}; | 592 | Expr result{}; |
| @@ -655,6 +653,8 @@ void DecompileShader(CFGRebuildState& state) { | |||
| 655 | state.manager->Decompile(); | 653 | state.manager->Decompile(); |
| 656 | } | 654 | } |
| 657 | 655 | ||
| 656 | } // Anonymous namespace | ||
| 657 | |||
| 658 | std::unique_ptr<ShaderCharacteristics> ScanFlow(const ProgramCode& program_code, u32 start_address, | 658 | std::unique_ptr<ShaderCharacteristics> ScanFlow(const ProgramCode& program_code, u32 start_address, |
| 659 | const CompilerSettings& settings, | 659 | const CompilerSettings& settings, |
| 660 | Registry& registry) { | 660 | Registry& registry) { |
diff --git a/src/video_core/textures/decoders.cpp b/src/video_core/textures/decoders.cpp index 7df5f1452..fae8638ec 100644 --- a/src/video_core/textures/decoders.cpp +++ b/src/video_core/textures/decoders.cpp | |||
| @@ -11,6 +11,7 @@ | |||
| 11 | #include "video_core/textures/texture.h" | 11 | #include "video_core/textures/texture.h" |
| 12 | 12 | ||
| 13 | namespace Tegra::Texture { | 13 | namespace Tegra::Texture { |
| 14 | namespace { | ||
| 14 | 15 | ||
| 15 | /** | 16 | /** |
| 16 | * This table represents the internal swizzle of a gob, | 17 | * This table represents the internal swizzle of a gob, |
| @@ -174,6 +175,8 @@ void SwizzledData(u8* const swizzled_data, u8* const unswizzled_data, const bool | |||
| 174 | } | 175 | } |
| 175 | } | 176 | } |
| 176 | 177 | ||
| 178 | } // Anonymous namespace | ||
| 179 | |||
| 177 | void CopySwizzledData(u32 width, u32 height, u32 depth, u32 bytes_per_pixel, | 180 | void CopySwizzledData(u32 width, u32 height, u32 depth, u32 bytes_per_pixel, |
| 178 | u32 out_bytes_per_pixel, u8* const swizzled_data, u8* const unswizzled_data, | 181 | u32 out_bytes_per_pixel, u8* const swizzled_data, u8* const unswizzled_data, |
| 179 | bool unswizzle, u32 block_height, u32 block_depth, u32 width_spacing) { | 182 | bool unswizzle, u32 block_height, u32 block_depth, u32 width_spacing) { |
diff --git a/src/video_core/textures/decoders.h b/src/video_core/textures/decoders.h index e5eac3f3b..9f2d6d308 100644 --- a/src/video_core/textures/decoders.h +++ b/src/video_core/textures/decoders.h | |||
| @@ -56,8 +56,7 @@ void UnswizzleSubrect(u32 subrect_width, u32 subrect_height, u32 dest_pitch, u32 | |||
| 56 | u32 bytes_per_pixel, u8* swizzled_data, u8* unswizzled_data, u32 block_height, | 56 | u32 bytes_per_pixel, u8* swizzled_data, u8* unswizzled_data, u32 block_height, |
| 57 | u32 offset_x, u32 offset_y); | 57 | u32 offset_x, u32 offset_y); |
| 58 | 58 | ||
| 59 | void SwizzleKepler(const u32 width, const u32 height, const u32 dst_x, const u32 dst_y, | 59 | void SwizzleKepler(u32 width, u32 height, u32 dst_x, u32 dst_y, u32 block_height, |
| 60 | const u32 block_height, const std::size_t copy_size, const u8* source_data, | 60 | std::size_t copy_size, const u8* source_data, u8* swizzle_data); |
| 61 | u8* swizzle_data); | ||
| 62 | 61 | ||
| 63 | } // namespace Tegra::Texture | 62 | } // namespace Tegra::Texture |
diff --git a/src/yuzu/applets/profile_select.cpp b/src/yuzu/applets/profile_select.cpp index 6aff38735..4bc8ee726 100644 --- a/src/yuzu/applets/profile_select.cpp +++ b/src/yuzu/applets/profile_select.cpp | |||
| @@ -17,6 +17,7 @@ | |||
| 17 | #include "yuzu/applets/profile_select.h" | 17 | #include "yuzu/applets/profile_select.h" |
| 18 | #include "yuzu/main.h" | 18 | #include "yuzu/main.h" |
| 19 | 19 | ||
| 20 | namespace { | ||
| 20 | QString FormatUserEntryText(const QString& username, Common::UUID uuid) { | 21 | QString FormatUserEntryText(const QString& username, Common::UUID uuid) { |
| 21 | return QtProfileSelectionDialog::tr( | 22 | return QtProfileSelectionDialog::tr( |
| 22 | "%1\n%2", "%1 is the profile username, %2 is the formatted UUID (e.g. " | 23 | "%1\n%2", "%1 is the profile username, %2 is the formatted UUID (e.g. " |
| @@ -41,6 +42,7 @@ QPixmap GetIcon(Common::UUID uuid) { | |||
| 41 | 42 | ||
| 42 | return icon.scaled(64, 64, Qt::IgnoreAspectRatio, Qt::SmoothTransformation); | 43 | return icon.scaled(64, 64, Qt::IgnoreAspectRatio, Qt::SmoothTransformation); |
| 43 | } | 44 | } |
| 45 | } // Anonymous namespace | ||
| 44 | 46 | ||
| 45 | QtProfileSelectionDialog::QtProfileSelectionDialog(QWidget* parent) | 47 | QtProfileSelectionDialog::QtProfileSelectionDialog(QWidget* parent) |
| 46 | : QDialog(parent), profile_manager(std::make_unique<Service::Account::ProfileManager>()) { | 48 | : QDialog(parent), profile_manager(std::make_unique<Service::Account::ProfileManager>()) { |