diff --git a/Dockerfile b/Dockerfile index 6fb2d84..79072ee 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM wiiuenv/devkitppc:20210920 +FROM wiiuenv/devkitppc:20211106 COPY --from=wiiuenv/wiiumodulesystem:20211031 /artifacts $DEVKITPRO diff --git a/relocator/src/utils/imports.h b/relocator/src/utils/imports.h index 8d2dec3..5a298cb 100644 --- a/relocator/src/utils/imports.h +++ b/relocator/src/utils/imports.h @@ -17,6 +17,7 @@ IMPORT(MEMGetAllocatableSizeForExpHeapEx); IMPORT(MEMCreateExpHeapEx); IMPORT(OSUninterruptibleSpinLock_Acquire); IMPORT(OSUninterruptibleSpinLock_Release); +IMPORT(OSReport); IMPORT_END(); diff --git a/relocator/src/utils/logger.c b/relocator/src/utils/logger.c index ddaf04d..ad8f213 100644 --- a/relocator/src/utils/logger.c +++ b/relocator/src/utils/logger.c @@ -87,6 +87,7 @@ void log_deinit() { } void log_print(const char *str) { + OSReport(str); // socket is always 0 initially as it is in the BSS if (log_socket < 0) { return; diff --git a/source/main.cpp b/source/main.cpp index c2fdd3e..a879018 100644 --- a/source/main.cpp +++ b/source/main.cpp @@ -8,6 +8,8 @@ #include #include #include +#include +#include #include #include "fs/DirList.h" @@ -70,7 +72,10 @@ bool doRelocation(std::vector &relocData, relocation_trampolin_e } int main(int argc, char **argv) { - WHBLogUdpInit(); + if (!WHBLogModuleInit()) { + WHBLogCafeInit(); + WHBLogUdpInit(); + } // 0x100 because before the .text section is a .init section // Currently the size of the .init is ~ 0x24 bytes. We substract 0x100 to be safe.