mirror of
https://github.com/wiiu-env/FunctionPatcherModule.git
synced 2026-04-24 23:10:06 -05:00
Reset the cached function handle if RPL has been unloaded
This commit is contained in:
parent
6dfe347311
commit
77d9721ccc
|
|
@ -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