MCPcopy Create free account
hub / github.com/devkitPro/libctru / FSUSER_IsSdmcDetected

Function FSUSER_IsSdmcDetected

libctru/source/services/fs.c:511–523  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

509}
510
511Result FSUSER_IsSdmcDetected(bool *detected)
512{
513 u32 *cmdbuf = getThreadCommandBuffer();
514
515 cmdbuf[0] = IPC_MakeHeader(0x817,0,0); // 0x8170000
516
517 Result ret = 0;
518 if(R_FAILED(ret = svcSendSyncRequest(fsSession()))) return ret;
519
520 if(detected) *detected = cmdbuf[2] & 0xFF;
521
522 return cmdbuf[1];
523}
524
525Result FSUSER_IsSdmcWritable(bool *writable)
526{

Callers

nothing calls this directly

Calls 3

getThreadCommandBufferFunction · 0.85
IPC_MakeHeaderFunction · 0.85
fsSessionFunction · 0.85

Tested by

no test coverage detected