Compare commits
2 commits
6437206b24
...
3473a8723b
Author | SHA1 | Date | |
---|---|---|---|
3473a8723b | |||
f088f028f3 |
3 changed files with 5 additions and 4 deletions
|
@ -310,6 +310,7 @@ endif()
|
||||||
if (ARCHITECTURE_arm64 AND (ANDROID OR PLATFORM_LINUX))
|
if (ARCHITECTURE_arm64 AND (ANDROID OR PLATFORM_LINUX))
|
||||||
set(HAS_NCE 1)
|
set(HAS_NCE 1)
|
||||||
add_compile_definitions(HAS_NCE=1)
|
add_compile_definitions(HAS_NCE=1)
|
||||||
|
find_package(oaknut 2.0.1)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (YUZU_ROOM)
|
if (YUZU_ROOM)
|
||||||
|
|
|
@ -1224,7 +1224,7 @@ if (HAS_NCE)
|
||||||
arm/nce/patcher.h
|
arm/nce/patcher.h
|
||||||
arm/nce/visitor_base.h
|
arm/nce/visitor_base.h
|
||||||
)
|
)
|
||||||
target_link_libraries(core PRIVATE merry::mcl merry::oaknut)
|
target_link_libraries(core PRIVATE merry::oaknut)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (ARCHITECTURE_x86_64 OR ARCHITECTURE_arm64)
|
if (ARCHITECTURE_x86_64 OR ARCHITECTURE_arm64)
|
||||||
|
|
|
@ -27,11 +27,11 @@ template <>
|
||||||
struct std::hash<PatchCacheKey> {
|
struct std::hash<PatchCacheKey> {
|
||||||
size_t operator()(const PatchCacheKey& key) const {
|
size_t operator()(const PatchCacheKey& key) const {
|
||||||
// Simple XOR hash of first few bytes
|
// 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) {
|
for (size_t i = 0; i < key.module_id.size(); ++i) {
|
||||||
hash ^= static_cast<size_t>(key.module_id[i]) << ((i % sizeof(size_t)) * 8);
|
hash_ ^= static_cast<size_t>(key.module_id[i]) << ((i % sizeof(size_t)) * 8);
|
||||||
}
|
}
|
||||||
return hash ^ std::hash<uintptr_t>{}(key.offset);
|
return hash_ ^ std::hash<uintptr_t>{}(key.offset);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue