From 2b016f914454e1bacc8c83e2d06f66d4b2ad0cb1 Mon Sep 17 00:00:00 2001 From: coah <100182500+coah80@users.noreply.github.com> Date: Tue, 22 Sep 2026 04:25:45 +0000 Subject: [PATCH] Match iplNwc24Manager --- configure.py | 2 +- include/system/iplCdbManager.h | 2 +- src/system/iplCdbManager.cpp | 2 +- src/system/iplNwc24Manager.cpp | 13 +++++++------ 4 files changed, 10 insertions(+), 9 deletions(-) diff --git a/configure.py b/configure.py index a7e692e4..7b01dac9 100644 --- a/configure.py +++ b/configure.py @@ -641,7 +641,7 @@ config.libs = [ Object(Matching, "system/iplCdbManager.cpp"), Object(Matching, "system/iplCdbWrapper.cpp"), Object(Matching, "system/iplPlayTimeLog.cpp"), - Object(Equivalent, "system/iplNwc24Manager.cpp"), + Object(Matching, "system/iplNwc24Manager.cpp"), Object(Matching, "system/iplPointer.cpp"), Object(Matching, "system/iplPointerCore.cpp"), Object(Matching, "system/iplDialogWindow.cpp"), diff --git a/include/system/iplCdbManager.h b/include/system/iplCdbManager.h index 4120d09a..66e62ba5 100644 --- a/include/system/iplCdbManager.h +++ b/include/system/iplCdbManager.h @@ -25,7 +25,7 @@ namespace ipl { void closeDatabase(); BOOL createNewRecord(const char* recordName, const char* recordFileType, const OSCalendarTime* dateTime, u32* gameCode, u16* makerCode, - const math::VEC2& recordPos, u32 recordFlags, const NWC24FriendAddr& addr, u16 addrType, u16 noReplyFlag, + const math::VEC2& recordPos, u32 recordFlags, const NWC24FriendAddr& addr, NWC24FriendType addrType, u16 noReplyFlag, const wchar_t* titleText, const wchar_t* bodyText, const void* faceData, const void** attachData, u32* attachSize, RBRAttachmentType* attachType); diff --git a/src/system/iplCdbManager.cpp b/src/system/iplCdbManager.cpp index d34468c4..b72bd1bd 100644 --- a/src/system/iplCdbManager.cpp +++ b/src/system/iplCdbManager.cpp @@ -38,7 +38,7 @@ namespace ipl { } BOOL Manager::createNewRecord(const char* recordName, const char* recordFileType, const OSCalendarTime* dateTime, u32* gameCode, - u16* makerCode, const math::VEC2& recordPos, u32 recordFlags, const NWC24FriendAddr& addr, u16 addrType, + u16* makerCode, const math::VEC2& recordPos, u32 recordFlags, const NWC24FriendAddr& addr, NWC24FriendType addrType, u16 noReplyFlag, const wchar_t* titleText, const wchar_t* bodyText, const void* faceData, const void** attachData, u32* attachSize, RBRAttachmentType* attachType) { BOOL result = FALSE; diff --git a/src/system/iplNwc24Manager.cpp b/src/system/iplNwc24Manager.cpp index 28d6e010..4a9b0058 100644 --- a/src/system/iplNwc24Manager.cpp +++ b/src/system/iplNwc24Manager.cpp @@ -559,7 +559,7 @@ namespace ipl { memset(msgFriendName, 0, sizeof(msgFriendName)); // Get message data - NWC24MsgObj msgObj ALIGN32; + NWC24MsgObj msgObj ATTRIBUTE_ALIGN(16); NWC24MsgType msgType; if (!getMsgObj(&msgObj, NWC24_MBOX_TYPE_RECV, mMsgIdsTbl[i]) || !getMsgType(&msgObj, &msgType)) { continue; @@ -569,7 +569,7 @@ namespace ipl { NWC24FriendAddr msgFriendAddr; memset(&msgFriendAddr, 0, sizeof(msgFriendAddr)); - u16 msgFriendType; + NWC24FriendType msgFriendType; // Get friend data if (msgType == NWC24_MSGTYPE_PUBLIC) { @@ -579,7 +579,7 @@ namespace ipl { } msgFriendType = NWC24_FRIENDTYPE_EMAIL; if (searchFriendInfo(&msgFriendAddr, &index)) { - NWC24FriendInfo friendInfo; + NWC24FriendInfo friendInfo ALIGN32; readFriendInfo(&friendInfo, index); wcsncpy(msgFriendName, (wchar_t*)friendInfo.attr.name, 12); } @@ -588,7 +588,7 @@ namespace ipl { getMsgFromId(&msgObj, &msgFriendAddr.wiiId); msgFriendType = msgFriendAddr.wiiId == myUserId ? NWC24_FRIENDTYPE_NONE : NWC24_FRIENDTYPE_WII; if (searchFriendInfo(msgFriendAddr.wiiId, &index)) { - NWC24FriendInfo friendInfo; + NWC24FriendInfo friendInfo ALIGN32; readFriendInfo(&friendInfo, index); wcsncpy(msgFriendName, (wchar_t*)friendInfo.attr.name, 12); } @@ -596,6 +596,7 @@ namespace ipl { // Get app and group ID u32 msgAppId; + u16 msgOptOutAppId; u16 msgGroupId; getMsgAppId(&msgObj, &msgAppId); getMsgGroupId(&msgObj, &msgGroupId); @@ -613,9 +614,9 @@ namespace ipl { // Get opt out flag (display "Opt Out" button) BOOL msgMbOptOutFlag = FALSE; - u32 msgOptOutAppId = 0; bool msgBoardUpdateSW = (result & (bool)msgMbUpdateSW); - result = readMsgMBOptOutFlag(&msgObj, &msgMbOptOutFlag, &msgOptOutAppId); + *(u32*)&msgOptOutAppId = 0; + result = readMsgMBOptOutFlag(&msgObj, &msgMbOptOutFlag, (u32*)&msgOptOutAppId); if (!FILE_ERROR_OK) { goto out; } -- 2.49.1