Use latest libfunctionpatcher

This commit is contained in:
Maschell 2023-01-07 16:17:29 +01:00
parent 8f2cbfb72e
commit 275eb604c6
3 changed files with 9 additions and 3 deletions

View File

@ -1,7 +1,7 @@
FROM wiiuenv/devkitppc:20221228 FROM wiiuenv/devkitppc:20221228
COPY --from=wiiuenv/librpxloader:20220903 /artifacts $DEVKITPRO COPY --from=wiiuenv/librpxloader:20220903 /artifacts $DEVKITPRO
COPY --from=wiiuenv/libfunctionpatcher:20220904 /artifacts $DEVKITPRO COPY --from=wiiuenv/libfunctionpatcher:20230106 /artifacts $DEVKITPRO
COPY --from=wiiuenv/wiiumodulesystem:20230106 /artifacts $DEVKITPRO COPY --from=wiiuenv/wiiumodulesystem:20230106 /artifacts $DEVKITPRO
COPY --from=wiiuenv/libwuhbutils:20220904 /artifacts $DEVKITPRO COPY --from=wiiuenv/libwuhbutils:20220904 /artifacts $DEVKITPRO
COPY --from=wiiuenv/libcontentredirection:20221010 /artifacts $DEVKITPRO COPY --from=wiiuenv/libcontentredirection:20221010 /artifacts $DEVKITPRO

View File

@ -38,7 +38,7 @@ CFLAGS += $(INCLUDE) -D__WIIU__ -D__WUT__
CXXFLAGS := $(CFLAGS) -std=c++20 CXXFLAGS := $(CFLAGS) -std=c++20
ASFLAGS := -g $(ARCH) 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) ifeq ($(DEBUG),1)
CXXFLAGS += -DDEBUG -g CXXFLAGS += -DDEBUG -g

View File

@ -27,9 +27,15 @@ WUMS_DEPENDS_ON(homebrew_functionpatcher);
WUMS_INITIALIZE() { WUMS_INITIALIZE() {
initLogging(); initLogging();
if (FunctionPatcher_InitLibrary() != FUNCTION_PATCHER_RESULT_SUCCESS) {
OSFatal("homebrew_rpx_loader: FunctionPatcher_InitLibrary failed");
}
DEBUG_FUNCTION_LINE("Patch functions"); DEBUG_FUNCTION_LINE("Patch functions");
for (uint32_t i = 0; i < rpx_utils_function_replacements_size; i++) { for (uint32_t i = 0; i < rpx_utils_function_replacements_size; i++) {
if (!FunctionPatcherPatchFunction(&rpx_utils_function_replacements[i], nullptr)) { bool wasPatched = false;
if (FunctionPatcher_AddFunctionPatch(&rpx_utils_function_replacements[i], nullptr, &wasPatched) != FUNCTION_PATCHER_RESULT_SUCCESS || !wasPatched) {
OSFatal("homebrew_rpx_loader: Failed to patch function"); OSFatal("homebrew_rpx_loader: Failed to patch function");
} }
} }