| 1483 | } |
| 1484 | |
| 1485 | Result APT_ReceiveDeliverArg(void* param, size_t paramSize, void* hmac, u64* sender, bool* received) |
| 1486 | { |
| 1487 | u32 cmdbuf[16]; |
| 1488 | cmdbuf[0]=IPC_MakeHeader(0x35,2,0); // 0x350080 |
| 1489 | cmdbuf[1]=paramSize; |
| 1490 | cmdbuf[2]=hmac ? 0x20 : 0; |
| 1491 | |
| 1492 | u32 saved_threadstorage[4]; |
| 1493 | u32* staticbufs = getThreadStaticBuffers(); |
| 1494 | saved_threadstorage[0]=staticbufs[0]; |
| 1495 | saved_threadstorage[1]=staticbufs[1]; |
| 1496 | saved_threadstorage[2]=staticbufs[2]; |
| 1497 | saved_threadstorage[3]=staticbufs[3]; |
| 1498 | staticbufs[0]=IPC_Desc_StaticBuffer(cmdbuf[1],0); |
| 1499 | staticbufs[1]=(u32)param; |
| 1500 | staticbufs[2]=IPC_Desc_StaticBuffer(cmdbuf[2],2); |
| 1501 | staticbufs[3]=(u32)hmac; |
| 1502 | |
| 1503 | Result ret = aptSendCommand(cmdbuf); |
| 1504 | staticbufs[0]=saved_threadstorage[0]; |
| 1505 | staticbufs[1]=saved_threadstorage[1]; |
| 1506 | staticbufs[2]=saved_threadstorage[2]; |
| 1507 | staticbufs[3]=saved_threadstorage[3]; |
| 1508 | |
| 1509 | if (R_SUCCEEDED(ret)) |
| 1510 | { |
| 1511 | if (sender) *sender =cmdbuf[2] | ((u64)cmdbuf[3]<<32); |
| 1512 | if (received) *received =cmdbuf[4] & 0xFF; |
| 1513 | } |
| 1514 | |
| 1515 | return ret; |
| 1516 | } |
nothing calls this directly
no test coverage detected