mirror of
https://github.com/wiiu-env/MemoryMappingModule.git
synced 2024-11-22 01:39:20 +01:00
Use latest version of libfunctionpatcher
This commit is contained in:
parent
93fb8f7d84
commit
59300aad22
@ -87,7 +87,7 @@ function_replacement_data_t function_replacements[] __attribute__((section(".dat
|
|||||||
REPLACE_FUNCTION_VIA_ADDRESS(KiIsEffectiveRangeValid, 0xffee0d6c, 0xffee0d6c),
|
REPLACE_FUNCTION_VIA_ADDRESS(KiIsEffectiveRangeValid, 0xffee0d6c, 0xffee0d6c),
|
||||||
REPLACE_FUNCTION_VIA_ADDRESS(IPCKDriver_ValidatePhysicalAddress, 0xfff0cb5c, 0xfff0cb5c),
|
REPLACE_FUNCTION_VIA_ADDRESS(IPCKDriver_ValidatePhysicalAddress, 0xfff0cb5c, 0xfff0cb5c),
|
||||||
REPLACE_FUNCTION_VIA_ADDRESS(KiGetOrPutUserData, 0xffee0794, 0xffee0794),
|
REPLACE_FUNCTION_VIA_ADDRESS(KiGetOrPutUserData, 0xffee0794, 0xffee0794),
|
||||||
REPLACE_FUNCTION(MEMFindContainHeap, LIBRARY_COREINIT, MEMFindContainHeap),
|
REPLACE_FUNCTION(MEMFindContainHeap, LIBRARY_COREINIT, MEMFindContainHeap),
|
||||||
};
|
};
|
||||||
// clang-format on
|
// clang-format on
|
||||||
|
|
||||||
|
@ -1,8 +1,11 @@
|
|||||||
#include "function_replacements.h"
|
#include "function_replacements.h"
|
||||||
#include "logger.h"
|
|
||||||
#include "memory_mapping.h"
|
#include "memory_mapping.h"
|
||||||
|
#include <coreinit/debug.h>
|
||||||
#include <function_patcher/function_patching.h>
|
#include <function_patcher/function_patching.h>
|
||||||
#include <wums.h>
|
#include <wums.h>
|
||||||
|
#ifdef DEBUG
|
||||||
|
#include "logger.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
WUMS_MODULE_EXPORT_NAME("homebrew_memorymapping");
|
WUMS_MODULE_EXPORT_NAME("homebrew_memorymapping");
|
||||||
WUMS_MODULE_SKIP_INIT_FINI();
|
WUMS_MODULE_SKIP_INIT_FINI();
|
||||||
@ -13,11 +16,16 @@ WUMS_INITIALIZE(args) {
|
|||||||
if (!ucSetupRequired) {
|
if (!ucSetupRequired) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
ucSetupRequired = 0;
|
ucSetupRequired = 0;
|
||||||
MemoryMapping_setupMemoryMapping();
|
MemoryMapping_setupMemoryMapping();
|
||||||
MemoryMapping_CreateHeaps();
|
MemoryMapping_CreateHeaps();
|
||||||
|
|
||||||
FunctionPatcherPatchFunction(function_replacements, function_replacements_size);
|
for (uint32_t i = 0; i < function_replacements_size; i++) {
|
||||||
|
if (!FunctionPatcherPatchFunction(&function_replacements[i], nullptr)) {
|
||||||
|
OSFatal("homebrew_memorymapping: Failed to patch function");
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
|
Loading…
Reference in New Issue
Block a user