From c4050b3090df40ad3ceef6e31bc998f1dce6bb47 Mon Sep 17 00:00:00 2001 From: Maschell Date: Sun, 8 May 2022 19:31:18 +0200 Subject: [PATCH] Use latest libfunctionpatcher version --- Dockerfile | 6 +++--- src/main.cpp | 7 +++++-- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 503183f..87da73b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,8 @@ -FROM wiiuenv/devkitppc:20220417 +FROM wiiuenv/devkitppc:20220507 COPY --from=wiiuenv/librpxloader:20220417 /artifacts $DEVKITPRO -COPY --from=wiiuenv/libfunctionpatcher:20220211 /artifacts $DEVKITPRO -COPY --from=wiiuenv/wiiumodulesystem:20220204 /artifacts $DEVKITPRO +COPY --from=wiiuenv/libfunctionpatcher:20220507 /artifacts $DEVKITPRO +COPY --from=wiiuenv/wiiumodulesystem:20220507 /artifacts $DEVKITPRO COPY --from=wiiuenv/libwuhbutils:20220415 /artifacts $DEVKITPRO COPY --from=wiiuenv/libcontentredirection:20220414 /artifacts $DEVKITPRO COPY --from=wiiuenv/libromfs_wiiu:20220414 /artifacts $DEVKITPRO diff --git a/src/main.cpp b/src/main.cpp index 52b1240..548e911 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -23,8 +23,11 @@ extern "C" bool WUU_GetVersion(); WUMS_INITIALIZE() { initLogging(); DEBUG_FUNCTION_LINE("Patch functions"); - // we only patch static functions, we don't need re-patch them at every launch - FunctionPatcherPatchFunction(rpx_utils_function_replacements, rpx_utils_function_replacements_size); + for (uint32_t i = 0; i < rpx_utils_function_replacements_size; i++) { + if (!FunctionPatcherPatchFunction(&rpx_utils_function_replacements[i], nullptr)) { + OSFatal("homebrew_rpx_loader: Failed to patch function"); + } + } DEBUG_FUNCTION_LINE("Patch functions finished"); gReplacementInfo = {};