cfgu: Correct CFG_Get/SetConfigInfoBlk2/4/8 parameter type
This commit is contained in:
parent
bd9e559309
commit
846b79e5a6
@ -3,6 +3,7 @@
|
|||||||
* @brief CFGU (Configuration) Service
|
* @brief CFGU (Configuration) Service
|
||||||
*/
|
*/
|
||||||
#pragma once
|
#pragma once
|
||||||
|
#include <3ds/types.h>
|
||||||
|
|
||||||
/// Configuration region values.
|
/// Configuration region values.
|
||||||
typedef enum
|
typedef enum
|
||||||
@ -96,7 +97,7 @@ Result CFGU_IsNFCSupported(bool* isSupported);
|
|||||||
* @param blkID ID of the block to retrieve.
|
* @param blkID ID of the block to retrieve.
|
||||||
* @param outData Pointer to write the block data to.
|
* @param outData Pointer to write the block data to.
|
||||||
*/
|
*/
|
||||||
Result CFGU_GetConfigInfoBlk2(u32 size, u32 blkID, u8* outData);
|
Result CFGU_GetConfigInfoBlk2(u32 size, u32 blkID, void* outData);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Gets a config info block with flags = 4.
|
* @brief Gets a config info block with flags = 4.
|
||||||
@ -104,7 +105,7 @@ Result CFGU_GetConfigInfoBlk2(u32 size, u32 blkID, u8* outData);
|
|||||||
* @param blkID ID of the block to retrieve.
|
* @param blkID ID of the block to retrieve.
|
||||||
* @param outData Pointer to write the block data to.
|
* @param outData Pointer to write the block data to.
|
||||||
*/
|
*/
|
||||||
Result CFG_GetConfigInfoBlk4(u32 size, u32 blkID, u8* outData);
|
Result CFG_GetConfigInfoBlk4(u32 size, u32 blkID, void* outData);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Gets a config info block with flags = 8.
|
* @brief Gets a config info block with flags = 8.
|
||||||
@ -112,7 +113,7 @@ Result CFG_GetConfigInfoBlk4(u32 size, u32 blkID, u8* outData);
|
|||||||
* @param blkID ID of the block to retrieve.
|
* @param blkID ID of the block to retrieve.
|
||||||
* @param outData Pointer to write the block data to.
|
* @param outData Pointer to write the block data to.
|
||||||
*/
|
*/
|
||||||
Result CFG_GetConfigInfoBlk8(u32 size, u32 blkID, u8* outData);
|
Result CFG_GetConfigInfoBlk8(u32 size, u32 blkID, void* outData);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Sets a config info block with flags = 4.
|
* @brief Sets a config info block with flags = 4.
|
||||||
@ -120,7 +121,7 @@ Result CFG_GetConfigInfoBlk8(u32 size, u32 blkID, u8* outData);
|
|||||||
* @param blkID ID of the block to retrieve.
|
* @param blkID ID of the block to retrieve.
|
||||||
* @param inData Pointer to block data to write.
|
* @param inData Pointer to block data to write.
|
||||||
*/
|
*/
|
||||||
Result CFG_SetConfigInfoBlk4(u32 size, u32 blkID, u8* inData);
|
Result CFG_SetConfigInfoBlk4(u32 size, u32 blkID, const void* inData);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Sets a config info block with flags = 8.
|
* @brief Sets a config info block with flags = 8.
|
||||||
@ -128,7 +129,7 @@ Result CFG_SetConfigInfoBlk4(u32 size, u32 blkID, u8* inData);
|
|||||||
* @param blkID ID of the block to retrieve.
|
* @param blkID ID of the block to retrieve.
|
||||||
* @param inData Pointer to block data to write.
|
* @param inData Pointer to block data to write.
|
||||||
*/
|
*/
|
||||||
Result CFG_SetConfigInfoBlk8(u32 size, u32 blkID, u8* inData);
|
Result CFG_SetConfigInfoBlk8(u32 size, u32 blkID, const void* inData);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -149,7 +149,7 @@ Result CFGU_IsNFCSupported(bool* isSupported)
|
|||||||
|
|
||||||
// See here for block IDs:
|
// See here for block IDs:
|
||||||
// http://3dbrew.org/wiki/Config_Savegame#Configuration_blocks
|
// http://3dbrew.org/wiki/Config_Savegame#Configuration_blocks
|
||||||
Result CFGU_GetConfigInfoBlk2(u32 size, u32 blkID, u8* outData)
|
Result CFGU_GetConfigInfoBlk2(u32 size, u32 blkID, void* outData)
|
||||||
{
|
{
|
||||||
Result ret = 0;
|
Result ret = 0;
|
||||||
u32 *cmdbuf = getThreadCommandBuffer();
|
u32 *cmdbuf = getThreadCommandBuffer();
|
||||||
@ -165,7 +165,7 @@ Result CFGU_GetConfigInfoBlk2(u32 size, u32 blkID, u8* outData)
|
|||||||
return (Result)cmdbuf[1];
|
return (Result)cmdbuf[1];
|
||||||
}
|
}
|
||||||
|
|
||||||
Result CFG_GetConfigInfoBlk4(u32 size, u32 blkID, u8* outData)
|
Result CFG_GetConfigInfoBlk4(u32 size, u32 blkID, void* outData)
|
||||||
{
|
{
|
||||||
Result ret = 0;
|
Result ret = 0;
|
||||||
u32 *cmdbuf = getThreadCommandBuffer();
|
u32 *cmdbuf = getThreadCommandBuffer();
|
||||||
@ -181,7 +181,7 @@ Result CFG_GetConfigInfoBlk4(u32 size, u32 blkID, u8* outData)
|
|||||||
return (Result)cmdbuf[1];
|
return (Result)cmdbuf[1];
|
||||||
}
|
}
|
||||||
|
|
||||||
Result CFG_GetConfigInfoBlk8(u32 size, u32 blkID, u8* outData)
|
Result CFG_GetConfigInfoBlk8(u32 size, u32 blkID, void* outData)
|
||||||
{
|
{
|
||||||
Result ret = 0;
|
Result ret = 0;
|
||||||
u32 *cmdbuf = getThreadCommandBuffer();
|
u32 *cmdbuf = getThreadCommandBuffer();
|
||||||
@ -197,7 +197,7 @@ Result CFG_GetConfigInfoBlk8(u32 size, u32 blkID, u8* outData)
|
|||||||
return (Result)cmdbuf[1];
|
return (Result)cmdbuf[1];
|
||||||
}
|
}
|
||||||
|
|
||||||
Result CFG_SetConfigInfoBlk4(u32 size, u32 blkID, u8* inData)
|
Result CFG_SetConfigInfoBlk4(u32 size, u32 blkID, const void* inData)
|
||||||
{
|
{
|
||||||
Result ret = 0;
|
Result ret = 0;
|
||||||
u32 *cmdbuf = getThreadCommandBuffer();
|
u32 *cmdbuf = getThreadCommandBuffer();
|
||||||
@ -213,7 +213,7 @@ Result CFG_SetConfigInfoBlk4(u32 size, u32 blkID, u8* inData)
|
|||||||
return (Result)cmdbuf[1];
|
return (Result)cmdbuf[1];
|
||||||
}
|
}
|
||||||
|
|
||||||
Result CFG_SetConfigInfoBlk8(u32 size, u32 blkID, u8* inData)
|
Result CFG_SetConfigInfoBlk8(u32 size, u32 blkID, const void* inData)
|
||||||
{
|
{
|
||||||
Result ret = 0;
|
Result ret = 0;
|
||||||
u32 *cmdbuf = getThreadCommandBuffer();
|
u32 *cmdbuf = getThreadCommandBuffer();
|
||||||
|
@ -128,7 +128,7 @@ Result udsGenerateNodeInfo(udsNodeInfo *nodeinfo, const char *username)
|
|||||||
ret = cfguInit();
|
ret = cfguInit();
|
||||||
if (R_FAILED(ret))return ret;
|
if (R_FAILED(ret))return ret;
|
||||||
|
|
||||||
ret = CFGU_GetConfigInfoBlk2(sizeof(nodeinfo->uds_friendcodeseed), 0x00090000, (u8*)&nodeinfo->uds_friendcodeseed);
|
ret = CFGU_GetConfigInfoBlk2(sizeof(nodeinfo->uds_friendcodeseed), 0x00090000, &nodeinfo->uds_friendcodeseed);
|
||||||
if (R_FAILED(ret))
|
if (R_FAILED(ret))
|
||||||
{
|
{
|
||||||
cfguExit();
|
cfguExit();
|
||||||
|
Loading…
Reference in New Issue
Block a user