Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion config/RSPE01_01/symbols.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6854,7 +6854,7 @@ systemShutDown__11RPSysSystemFv = .text:0x801831F0; // type:function size:0xD8
fn_801832C8 = .text:0x801832C8; // type:function size:0x28
fn_801832F0 = .text:0x801832F0; // type:function size:0x18
startLoadCount__11RPSysSystemFv = .text:0x80183308; // type:function size:0xC
fn_80183314 = .text:0x80183314; // type:function size:0xA0
getCalendarTime__11RPSysSystemFPCUsRUlRUlRUl = .text:0x80183314; // type:function size:0xA0
fn_801833B4 = .text:0x801833B4; // type:function size:0xBC
getCalendarTime16__11RPSysSystemFv = .text:0x80183470; // type:function size:0x4C
getCalendarTime32__11RPSysSystemFv = .text:0x801834BC; // type:function size:0x5C
Expand Down
2 changes: 1 addition & 1 deletion configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -1208,7 +1208,7 @@ def MatchingFor(*versions):
Object(NonMatching, "Pack/RPKernel/RPSysAppMiiManager.cpp"),
Object(Matching, "Pack/RPKernel/RPSysPairingMgr.cpp"),
Object(NonMatching, "Pack/RPKernel/RPSysControllerMgr.cpp"),
Object(NonMatching, "Pack/RPKernel/RPSysNWC24Manager.cpp"),
Object(Matching, "Pack/RPKernel/RPSysNWC24Manager.cpp"),
Object(NonMatching, "Pack/RPKernel/RPSysParticleManager.cpp"),
],
},
Expand Down
2 changes: 1 addition & 1 deletion include/Pack/RPKernel/RPSysNWC24Manager.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class RPSysNWC24Manager {
*
* @param pHeap Heap to use for allocations
*/
RPSysNWC24Manager(EGG::Heap* pHeap);
explicit RPSysNWC24Manager(EGG::Heap* pHeap);

/**
* @brief Destructor
Expand Down
18 changes: 12 additions & 6 deletions src/Pack/RPKernel/RPSysNWC24Manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ RPSysNWC24Manager::~RPSysNWC24Manager() {}
/**
* @brief Attempts to commit a message to the Wii Message Board
*
* @param pWork Library work buffer
* @param pAltName Mail letter alt name
* @param pMsg Mail letter message (can be a format string)
* @param date Mail letter send date
Expand Down Expand Up @@ -219,21 +218,24 @@ bool RPSysNWC24Manager::commitMail(const wchar_t* pAltName, const wchar_t* pMsg,
/**
* @brief Attempts to open the WiiConnect24 library for use
*
* @return Success
* @return True if the library is opened, false if not
*/
bool RPSysNWC24Manager::openLib() {
NWC24Work* pNwc24Work = reinterpret_cast<NWC24Work*>(mpNwc24Work);
bool finished;

switch (NWC24OpenLib(pNwc24Work)) {
case NWC24_ERR_LIB_OPENED:
case NWC24_OK: {
return true;
finished = true;
break;
}

case NWC24_ERR_INPROGRESS:
case NWC24_ERR_BUSY:
case NWC24_ERR_MUTEX: {
return false;
finished = false;
break;
}

case NWC24_ERR_NAND_CORRUPT:
Expand All @@ -245,14 +247,18 @@ bool RPSysNWC24Manager::openLib() {
case NWC24_ERR_FILE_OPEN:
case NWC24_ERR_BROKEN:
case NWC24_ERR_FATAL: {
finished = false;
sSuccess = false;
return false;
break;
}

default: {
return false;
finished = false;
break;
}
}

return finished;
}

/**
Expand Down
Loading