mirror of
https://github.com/wiiu-env/FunctionPatcherModule.git
synced 2026-05-07 05:16:43 -05:00
Add more fiushed to be safe
This commit is contained in:
parent
558b7fa0f0
commit
1a294db7ea
|
|
@ -63,6 +63,9 @@ bool PatchFunction(std::shared_ptr<PatchedFunctionData> &patchedFunction) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DCFlushRange(gJumpHeapData, JUMP_HEAP_DATA_SIZE);
|
||||||
|
ICInvalidateRange(gJumpHeapData, JUMP_HEAP_DATA_SIZE);
|
||||||
|
|
||||||
if (patchedFunction->functionName) {
|
if (patchedFunction->functionName) {
|
||||||
DEBUG_FUNCTION_LINE("Patching function %s...", patchedFunction->functionName->c_str());
|
DEBUG_FUNCTION_LINE("Patching function %s...", patchedFunction->functionName->c_str());
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -85,6 +88,9 @@ bool PatchFunction(std::shared_ptr<PatchedFunctionData> &patchedFunction) {
|
||||||
// Write this->replaceWithInstruction to the first instruction of the function we want to replace.
|
// Write this->replaceWithInstruction to the first instruction of the function we want to replace.
|
||||||
CThread::runOnAllCores(writeDataAndFlushIC, patchedFunction.get());
|
CThread::runOnAllCores(writeDataAndFlushIC, patchedFunction.get());
|
||||||
|
|
||||||
|
DCFlushRange(gJumpHeapData, JUMP_HEAP_DATA_SIZE);
|
||||||
|
ICInvalidateRange(gJumpHeapData, JUMP_HEAP_DATA_SIZE);
|
||||||
|
|
||||||
// Set patch status
|
// Set patch status
|
||||||
patchedFunction->isPatched = true;
|
patchedFunction->isPatched = true;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user