From 3b2e5748e6db444693f54b7e5c0ed571db1c3dd6 Mon Sep 17 00:00:00 2001 From: NarcolepticK Date: Tue, 23 Jul 2019 21:31:49 -0400 Subject: [PATCH 1/3] compile fix --- source/open.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/open.cpp b/source/open.cpp index a8e7459..8fe3fe7 100644 --- a/source/open.cpp +++ b/source/open.cpp @@ -44,7 +44,7 @@ void openMenu(Streetpass::StreetpassManager& sm) { void openBox(Streetpass::StreetpassManager& sm, u8 slotNum) { const std::string boxName = sm.BoxList().BoxNames()[slotNum]; - std::unique_ptr mbox = sm.OpenBox(slotNum); + std::shared_ptr mbox = sm.OpenBox(slotNum); const std::string rootCecPath = "/CEC/"; const std::string mboxPath = rootCecPath + boxName + "/"; From 208e01074f0a54997047bfc2cfd6085f8e674416 Mon Sep 17 00:00:00 2001 From: NarcolepticK Date: Tue, 23 Jul 2019 21:32:18 -0400 Subject: [PATCH 2/3] update deprecated function calls --- source/3ds/services/cecdu.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/3ds/services/cecdu.c b/source/3ds/services/cecdu.c index 55920e8..7b85153 100644 --- a/source/3ds/services/cecdu.c +++ b/source/3ds/services/cecdu.c @@ -30,7 +30,7 @@ Result CECDU_Open(u32 programID, CecDataPathType path, u32 flag, u32* size) cmdbuf[1] = programID; cmdbuf[2] = path; cmdbuf[3] = flag; - cmdbuf[4] = IPC_Desc_CurProcessHandle(); // do placeholder + cmdbuf[4] = IPC_Desc_CurProcessId(); // do placeholder cmdbuf[5] = 0; // placeholder if (R_FAILED(res = svcSendSyncRequest(cecduHandle))) return res; @@ -313,7 +313,7 @@ Result CECDU_OpenAndWrite(u32 bufferSize, u32 programID, CecDataPathType path, u cmdbuf[2] = programID; cmdbuf[3] = path; cmdbuf[4] = flag; - cmdbuf[5] = IPC_Desc_CurProcessHandle(); // do placeholder + cmdbuf[5] = IPC_Desc_CurProcessId(); // do placeholder cmdbuf[6] = 0; // placeholder cmdbuf[7] = IPC_Desc_Buffer(bufferSize, IPC_BUFFER_R); cmdbuf[8] = (u32)buffer; @@ -332,7 +332,7 @@ Result CECDU_OpenAndRead(u32 bufferSize, u32 programID, CecDataPathType path, u3 cmdbuf[2] = programID; cmdbuf[3] = path; cmdbuf[4] = flag; - cmdbuf[5] = IPC_Desc_CurProcessHandle(); + cmdbuf[5] = IPC_Desc_CurProcessId(); cmdbuf[6] = 0; cmdbuf[7] = IPC_Desc_Buffer(bufferSize, IPC_BUFFER_W); cmdbuf[8] = (u32)buffer; From 75eea133c52c4509ce30bea08781f094f3666f13 Mon Sep 17 00:00:00 2001 From: NarcolepticK Date: Sat, 3 Aug 2019 01:56:23 -0400 Subject: [PATCH 3/3] boxId's should be handled consistantly as 16 bytes. Otherwise breaks things. --- source/streetpass/MBoxList.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/streetpass/MBoxList.cpp b/source/streetpass/MBoxList.cpp index 2af384e..d1833d6 100644 --- a/source/streetpass/MBoxList.cpp +++ b/source/streetpass/MBoxList.cpp @@ -114,7 +114,7 @@ Result MBoxList::DeleteAllBoxes() { std::vector MBoxList::BoxIds() const { std::vector ret{}; - std::vector boxId(8); + std::vector boxId(16); for (u32 slotNum = 0; slotNum < MaxSlots; slotNum++) { std::memcpy(boxId.data(), mboxListHeader.boxNames[slotNum], boxId.size()); std::string boxName(boxId.data());