mirror of
https://github.com/wiiu-env/ContentRedirectionModule.git
synced 2024-11-17 17:09:23 +01:00
Use the latest libfunctionpatcher version
This commit is contained in:
parent
716deafb13
commit
488df227eb
@ -1,6 +1,6 @@
|
||||
FROM wiiuenv/devkitppc:20221228
|
||||
|
||||
COPY --from=wiiuenv/libfunctionpatcher:20220904 /artifacts $DEVKITPRO
|
||||
COPY --from=wiiuenv/libfunctionpatcher:20230106 /artifacts $DEVKITPRO
|
||||
COPY --from=wiiuenv/wiiumodulesystem:20230106 /artifacts $DEVKITPRO
|
||||
COPY --from=wiiuenv/libromfs_wiiu:20220904 /artifacts $DEVKITPRO
|
||||
COPY --from=wiiuenv/libcontentredirection:20221010 /artifacts $DEVKITPRO
|
||||
|
2
Makefile
2
Makefile
@ -37,7 +37,7 @@ CFLAGS += $(INCLUDE) -D__WIIU__ -D__WUT__
|
||||
CXXFLAGS := $(CFLAGS) -std=c++20
|
||||
|
||||
ASFLAGS := -g $(ARCH)
|
||||
LDFLAGS = -g $(ARCH) $(RPXSPECS) -Wl,-Map,$(notdir $*.map) -T$(WUMS_ROOT)/share/libfunctionpatcher.ld $(WUMSSPECS)
|
||||
LDFLAGS = -g $(ARCH) $(RPXSPECS) -Wl,-Map,$(notdir $*.map) $(WUMSSPECS)
|
||||
|
||||
ifeq ($(DEBUG),1)
|
||||
CXXFLAGS += -DDEBUG -g
|
||||
|
14
src/main.cpp
14
src/main.cpp
@ -25,17 +25,25 @@ function_replacement_data_t OSCancelThreadReplacement = REPLACE_FUNCTION(OSCance
|
||||
WUMS_INITIALIZE() {
|
||||
initLogging();
|
||||
DEBUG_FUNCTION_LINE("Patch functions");
|
||||
if (FunctionPatcher_InitLibrary() != FUNCTION_PATCHER_RESULT_SUCCESS) {
|
||||
OSFatal("homebrew_content_redirection: FunctionPatcher_InitLibrary failed");
|
||||
}
|
||||
|
||||
bool wasPatched;
|
||||
for (uint32_t i = 0; i < fs_file_function_replacements_size; i++) {
|
||||
if (!FunctionPatcherPatchFunction(&fs_file_function_replacements[i], nullptr)) {
|
||||
wasPatched = false;
|
||||
if (FunctionPatcher_AddFunctionPatch(&fs_file_function_replacements[i], nullptr, &wasPatched) != FUNCTION_PATCHER_RESULT_SUCCESS || !wasPatched) {
|
||||
OSFatal("homebrew_content_redirection: Failed to patch function");
|
||||
}
|
||||
}
|
||||
for (uint32_t i = 0; i < fsa_file_function_replacements_size; i++) {
|
||||
if (!FunctionPatcherPatchFunction(&fsa_file_function_replacements[i], nullptr)) {
|
||||
wasPatched = false;
|
||||
if (FunctionPatcher_AddFunctionPatch(&fsa_file_function_replacements[i], nullptr, &wasPatched) != FUNCTION_PATCHER_RESULT_SUCCESS || !wasPatched) {
|
||||
OSFatal("homebrew_content_redirection: Failed to patch function");
|
||||
}
|
||||
}
|
||||
if (!FunctionPatcherPatchFunction(&OSCancelThreadReplacement, nullptr)) {
|
||||
wasPatched = false;
|
||||
if (FunctionPatcher_AddFunctionPatch(&OSCancelThreadReplacement, nullptr, &wasPatched) != FUNCTION_PATCHER_RESULT_SUCCESS || !wasPatched) {
|
||||
OSFatal("homebrew_content_redirection: Failed to patch OSCancelThreadReplacement");
|
||||
}
|
||||
DEBUG_FUNCTION_LINE("Patch functions finished");
|
||||
|
Loading…
Reference in New Issue
Block a user