Merge pull request #2325 from LukeUsher/log-failed-patches

hle: detect when patches fail to apply
This commit is contained in:
RadWolfie 2022-03-01 17:00:42 -06:00 committed by GitHub
commit 25b9a2efcc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 2 deletions

View File

@ -438,8 +438,14 @@ inline void EmuInstallPatch(const std::string FunctionName, const xbox::addr_xt
return;
}
g_FunctionHooks[FunctionName].Install((void*)(FunctionAddr), (void*)patch.patchFunc);
printf("HLE: %s Patched\n", FunctionName.c_str());
auto success = g_FunctionHooks[FunctionName].Install((void*)(FunctionAddr), (void*)patch.patchFunc);
if (success) {
printf("HLE: %s Patched\n", FunctionName.c_str());
}
else {
printf("HLE: %s Patch Failed\n", FunctionName.c_str());
}
}
void EmuInstallPatches()