1
Fork 0
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

20 lines
489 B

#pragma once
namespace AchievementFix
{
void Install()
{
REL::Relocation<std::uintptr_t> target;
if (GetLoadInterface()->RuntimeVersion().minor() > 6 || GetLoadInterface()->RuntimeVersion().patch() >= 1130) {
// Checked: 1.6.1130
target = REL::ID(441528);
} else {
// Checked: 1.5.97, 1.6.640, 1.6.659
target = REL::RelocationID(13647, 13755);
}
std::uint8_t code[] = { 0xB0, 0x00, 0xC3, REL::NOP };
REL::safe_write(target.address(), code, sizeof(code));
}
}