mirror of
https://github.com/wiiu-env/FunctionPatcherModule.git
synced 2026-09-12 11:06:31 -05:00
Check if the function is already patched before updating the addresses
This commit is contained in:
@@ -31,12 +31,12 @@ static void writeDataAndFlushIC(CThread *thread, void *arg) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool PatchFunction(std::shared_ptr<PatchedFunctionData> &patchedFunction) {
|
bool PatchFunction(std::shared_ptr<PatchedFunctionData> &patchedFunction) {
|
||||||
// The addresses of a function might change every time with run another application.
|
if (patchedFunction->isPatched) {
|
||||||
if (!patchedFunction->updateFunctionAddresses()) {
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (patchedFunction->isPatched) {
|
// The addresses of a function might change every time with run another application.
|
||||||
|
if (!patchedFunction->updateFunctionAddresses()) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user