Use the LoggingModule if possible

This commit is contained in:
Maschell 2021-11-06 23:16:37 +01:00
parent 4442c52b44
commit 1f2b65b308
2 changed files with 11 additions and 3 deletions

View File

@ -1,4 +1,4 @@
FROM wiiuenv/devkitppc:20210920
FROM wiiuenv/devkitppc:20211106
COPY --from=wiiuenv/wiiumodulesystem:20211031 /artifacts $DEVKITPRO
COPY --from=wiiuenv/wiiupluginsystem:20211001 /artifacts $DEVKITPRO

View File

@ -1,4 +1,6 @@
#include <whb/log_udp.h>
#include <whb/log_cafe.h>
#include <whb/log_module.h>
#include <wums.h>
#include <coreinit/debug.h>
#include <coreinit/cache.h>
@ -18,7 +20,10 @@ WUMS_MODULE_EXPORT_NAME("homebrew_wupsbackend");
WUMS_USE_WUT_DEVOPTAB();
WUMS_INITIALIZE(args) {
if (!WHBLogModuleInit()) {
WHBLogCafeInit();
WHBLogUdpInit();
}
gModuleData = args.module_information;
if (gModuleData == nullptr) {
@ -51,7 +56,10 @@ WUMS_APPLICATION_ENDS() {
void *allocOnCustomHeap(int alignment, int size);
WUMS_APPLICATION_STARTS() {
if (!WHBLogModuleInit()) {
WHBLogCafeInit();
WHBLogUdpInit();
}
uint32_t upid = OSGetUPID();
if (upid != 2 && upid != 15) {
return;