Fixed off by 1 bug causing some features like HDR tone mapping to not work.

This commit is contained in:
yuv420p10le
2024-08-26 21:59:14 +03:00
parent 7d5a79c019
commit 36046155d1
4 changed files with 3 additions and 3 deletions

View File

@@ -409,7 +409,7 @@ void hook_bitset_init(uintptr_t rcx, uintptr_t rdx)
g_feature_flags->set();
#if _DEBUG
std::println("[INFO] [plexmediaserver_crack] Forced feature flags on.", reinterpret_cast<uintptr_t>(g_feature_flags));
std::println("[INFO] [plexmediaserver_crack] Forced feature flags on {:08X}.", reinterpret_cast<uintptr_t>(g_feature_flags));
#endif
}
@@ -444,7 +444,7 @@ void hook()
// Features are now enabled in std::atomic<std::bitset> as of 2024/08/13 PMS BETA
if(bitset && bitset_init)
{
const uintptr_t addr = bitset.value() + 6 + *reinterpret_cast<uint32_t*>(bitset.value() + 9);
const uintptr_t addr = bitset.value() + 5 + *reinterpret_cast<uint32_t*>(bitset.value() + 9);
g_feature_flags = reinterpret_cast<std::bitset<416>*>(addr + sizeof(uintptr_t));
_bitset_init = safetyhook::create_inline(reinterpret_cast<void*>(bitset_init.value()), reinterpret_cast<void*>(hook_bitset_init));