mirror of
https://github.com/wiiu-env/WUMSLoader.git
synced 2025-01-13 08:49:09 +01:00
relocator: Fix location of Init-Hook call
This commit is contained in:
parent
2442bb46c5
commit
eac22b0583
@ -143,13 +143,13 @@ extern "C" void doStart(int argc, char **argv) {
|
|||||||
gInitCalled = 1;
|
gInitCalled = 1;
|
||||||
DEBUG_FUNCTION_LINE("Resolve relocations without replacing alloc functions\n");
|
DEBUG_FUNCTION_LINE("Resolve relocations without replacing alloc functions\n");
|
||||||
ResolveRelocations(loadedModules, false);
|
ResolveRelocations(loadedModules, false);
|
||||||
|
|
||||||
|
CallHook(loadedModules, WUMS_HOOK_INIT);
|
||||||
|
|
||||||
for (auto &curModule : loadedModules) {
|
for (auto &curModule : loadedModules) {
|
||||||
if (curModule.getExportName().compare("homebrew_memorymapping") == 0) {
|
if (curModule.getExportName().compare("homebrew_memorymapping") == 0) {
|
||||||
for (auto &curExport : curModule.getExportDataList()) {
|
for (auto &curExport : curModule.getExportDataList()) {
|
||||||
if (curExport.getName().compare("MemoryMappingEffectiveToPhysical") == 0) {
|
if (curExport.getName().compare("MemoryMappingEffectiveToPhysical") == 0) {
|
||||||
|
|
||||||
CallHook(loadedModules, WUMS_HOOK_INIT);
|
|
||||||
|
|
||||||
DEBUG_FUNCTION_LINE("Setting MemoryMappingEffectiveToPhysicalPTR to %08X\n", curExport.getAddress());
|
DEBUG_FUNCTION_LINE("Setting MemoryMappingEffectiveToPhysicalPTR to %08X\n", curExport.getAddress());
|
||||||
MemoryMappingEffectiveToPhysicalPTR = (uint32_t) curExport.getAddress();
|
MemoryMappingEffectiveToPhysicalPTR = (uint32_t) curExport.getAddress();
|
||||||
} else if (curExport.getName().compare("MemoryMappingPhysicalToEffective") == 0) {
|
} else if (curExport.getName().compare("MemoryMappingPhysicalToEffective") == 0) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user