Add CFGU_IsNFCSupported (IsFangateSupported)
This commit is contained in:
parent
a11bec5da5
commit
4bc8e195d5
@ -84,6 +84,12 @@ Result CFGU_GetCountryCodeString(u16 code, u16* string);
|
||||
*/
|
||||
Result CFGU_GetCountryCodeID(u16 string, u16* code);
|
||||
|
||||
/**
|
||||
* @brief Checks if NFC (code name: fangate) is supported.
|
||||
* @param isSupported pointer to the output the result to.
|
||||
*/
|
||||
Result CFGU_IsNFCSupported(bool* isSupported);
|
||||
|
||||
/**
|
||||
* @brief Gets a config info block with flags = 2.
|
||||
* @param size Size of the data to retrieve.
|
||||
|
@ -133,6 +133,20 @@ Result CFGU_GetCountryCodeID(u16 string, u16* code)
|
||||
return (Result)cmdbuf[1];
|
||||
}
|
||||
|
||||
Result CFGU_IsNFCSupported(bool* isSupported)
|
||||
{
|
||||
Result ret = 0;
|
||||
u32 *cmdbuf = getThreadCommandBuffer();
|
||||
|
||||
cmdbuf[0] = IPC_MakeHeader(0xB,0,0); // 0x000B0000
|
||||
|
||||
if(R_FAILED(ret = svcSendSyncRequest(cfguHandle)))return ret;
|
||||
|
||||
*isSupported = cmdbuf[2] & 0xFF;
|
||||
|
||||
return (Result)cmdbuf[1];
|
||||
}
|
||||
|
||||
// See here for block IDs:
|
||||
// http://3dbrew.org/wiki/Config_Savegame#Configuration_blocks
|
||||
Result CFGU_GetConfigInfoBlk2(u32 size, u32 blkID, u8* outData)
|
||||
|
Loading…
Reference in New Issue
Block a user