From 84ea0a0b1a238889d4512006613c789221d3a4a2 Mon Sep 17 00:00:00 2001 From: Marcin Serwin Date: Tue, 9 Sep 2025 21:04:39 +0200 Subject: [PATCH 1/4] core: find oaknut when building with NCE Signed-off-by: Marcin Serwin --- CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 411de4620b..2724bdf736 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -310,6 +310,7 @@ endif() if (ARCHITECTURE_arm64 AND (ANDROID OR PLATFORM_LINUX)) set(HAS_NCE 1) add_compile_definitions(HAS_NCE=1) + find_package(oaknut 2.0.1 REQUIRED) endif() if (YUZU_ROOM) From 393324bbe1c3578883edebf255a9a83416933a1a Mon Sep 17 00:00:00 2001 From: Marcin Serwin Date: Tue, 9 Sep 2025 21:04:39 +0200 Subject: [PATCH 2/4] nce: fix variable shadowing a member of std::hash Signed-off-by: Marcin Serwin --- src/core/arm/nce/patcher.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/core/arm/nce/patcher.h b/src/core/arm/nce/patcher.h index 7f54608e3f..31b122477f 100644 --- a/src/core/arm/nce/patcher.h +++ b/src/core/arm/nce/patcher.h @@ -27,11 +27,11 @@ template <> struct std::hash { size_t operator()(const PatchCacheKey& key) const { // Simple XOR hash of first few bytes - size_t hash = 0; + size_t hash_ = 0; for (size_t i = 0; i < key.module_id.size(); ++i) { - hash ^= static_cast(key.module_id[i]) << ((i % sizeof(size_t)) * 8); + hash_ ^= static_cast(key.module_id[i]) << ((i % sizeof(size_t)) * 8); } - return hash ^ std::hash{}(key.offset); + return hash_ ^ std::hash{}(key.offset); } }; From 2a92e4b5727a09ba222b6a92cc97f4712a972b64 Mon Sep 17 00:00:00 2001 From: Marcin Serwin Date: Tue, 9 Sep 2025 21:04:39 +0200 Subject: [PATCH 3/4] core: find oaknut when building with NCE Signed-off-by: Marcin Serwin --- CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 411de4620b..994bc184fa 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -310,6 +310,7 @@ endif() if (ARCHITECTURE_arm64 AND (ANDROID OR PLATFORM_LINUX)) set(HAS_NCE 1) add_compile_definitions(HAS_NCE=1) + find_package(oaknut 2.0.1) endif() if (YUZU_ROOM) From ffc0b99930ff09bbcc6b95a46cef1f5dc8d5bf2c Mon Sep 17 00:00:00 2001 From: Marcin Serwin Date: Tue, 9 Sep 2025 21:04:39 +0200 Subject: [PATCH 4/4] nce: fix variable shadowing a member of std::hash Signed-off-by: Marcin Serwin --- src/core/arm/nce/patcher.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/core/arm/nce/patcher.h b/src/core/arm/nce/patcher.h index 7f54608e3f..31b122477f 100644 --- a/src/core/arm/nce/patcher.h +++ b/src/core/arm/nce/patcher.h @@ -27,11 +27,11 @@ template <> struct std::hash { size_t operator()(const PatchCacheKey& key) const { // Simple XOR hash of first few bytes - size_t hash = 0; + size_t hash_ = 0; for (size_t i = 0; i < key.module_id.size(); ++i) { - hash ^= static_cast(key.module_id[i]) << ((i % sizeof(size_t)) * 8); + hash_ ^= static_cast(key.module_id[i]) << ((i % sizeof(size_t)) * 8); } - return hash ^ std::hash{}(key.offset); + return hash_ ^ std::hash{}(key.offset); } };