mirror of
https://github.com/wiiu-env/FunctionPatcherModule.git
synced 2025-01-06 23:28:14 +01:00
Reset the cached function handle if RPL has been unloaded
This commit is contained in:
parent
e51e6a9509
commit
ac0c341eb4
@ -67,3 +67,12 @@ function_replacement_library_type_t FunctionAddressProvider::getTypeForHandle(OS
|
|||||||
return LIBRARY_OTHER;
|
return LIBRARY_OTHER;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool FunctionAddressProvider::resetHandle(OSDynLoad_Module handle) {
|
||||||
|
for (auto &rplHandle : rpl_handles) {
|
||||||
|
if (rplHandle.handle == handle) {
|
||||||
|
rplHandle.handle = nullptr;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
@ -18,6 +18,8 @@ public:
|
|||||||
|
|
||||||
function_replacement_library_type_t getTypeForHandle(OSDynLoad_Module toReset);
|
function_replacement_library_type_t getTypeForHandle(OSDynLoad_Module toReset);
|
||||||
|
|
||||||
|
bool resetHandle(OSDynLoad_Module handle);
|
||||||
|
|
||||||
std::list<rpl_handling> rpl_handles = {
|
std::list<rpl_handling> rpl_handles = {
|
||||||
{LIBRARY_AVM, "avm.rpl", nullptr},
|
{LIBRARY_AVM, "avm.rpl", nullptr},
|
||||||
{LIBRARY_CAMERA, "camera.rpl", nullptr},
|
{LIBRARY_CAMERA, "camera.rpl", nullptr},
|
||||||
|
@ -106,6 +106,7 @@ void notify_callback(OSDynLoad_Module module,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
gFunctionAddressProvider->resetHandle(module);
|
||||||
CheckIfPatchedFunctionsAreStillInMemory();
|
CheckIfPatchedFunctionsAreStillInMemory();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user