Change from size_t to u32, and shorten function name

This commit is contained in:
Joel16 2018-12-29 20:31:01 -06:00
parent a6ef5ee90f
commit 924f845b5a
2 changed files with 15 additions and 15 deletions

View File

@ -178,7 +178,7 @@ Result FRD_GetMyComment(char *comment, size_t max_size);
* @param offset The index of the friend key to start with. * @param offset The index of the friend key to start with.
* @param size Size of the friend key list. (FRIEND_LIST_SIZE) * @param size Size of the friend key list. (FRIEND_LIST_SIZE)
*/ */
Result FRD_GetFriendKeyList(FriendKey *friendKeyList, size_t *num, size_t offset, size_t size); Result FRD_GetFriendKeyList(FriendKey *friendKeyList, u32 *num, u32 offset, u32 size);
/** /**
* @brief Gets the current user's friends' Mii data. * @brief Gets the current user's friends' Mii data.
@ -208,16 +208,16 @@ Result FRD_GetFriendPlayingGame(GameDescription *desc, const FriendKey *friendKe
* @brief Get the current user's friends' favourite game. * @brief Get the current user's friends' favourite game.
* @param desc Pointer to write Game Description data to. * @param desc Pointer to write Game Description data to.
* @param friendKeyList Pointer to FriendKeys, * @param friendKeyList Pointer to FriendKeys,
* @param size Number Of FriendKeys. * @param count Number Of FriendKeys.
*/ */
Result FRD_GetFriendFavouriteGame(GameDescription *desc, const FriendKey *friendKeyList, size_t size); Result FRD_GetFriendFavouriteGame(GameDescription *desc, const FriendKey *friendKeyList, u32 count);
/** /**
* @brief Gets whether a friend key is included in the current user's friend list. * @brief Gets whether a friend key is included in the current user's friend list.
* @param friendKeyList Pointer to a list of friend keys. * @param friendKeyList Pointer to a list of friend keys.
* @param isFromList Pointer to a write the friendship status to. * @param isFromList Pointer to a write the friendship status to.
*/ */
Result FRD_IsFromFriendList(FriendKey *friendKeyList, bool *isFromList); Result FRD_IsInFriendList(FriendKey *friendKeyList, bool *isFromList);
/** /**
* @brief Updates the game mode description string. * @brief Updates the game mode description string.
@ -234,10 +234,10 @@ Result FRD_AttachToEventNotification(Handle event);
/** /**
* @brief Get Latest Event Notification * @brief Get Latest Event Notification
* @param event Pointer to write recieved notification event struct to. * @param event Pointer to write recieved notification event struct to.
* @param size Number of events * @param count Number of events
* @param recievedNotifCount Number of notification reccieved. * @param recievedNotifCount Number of notification reccieved.
*/ */
Result FRD_GetEventNotification(NotificationEvent *event, size_t size, u32 *recievedNotifCount); Result FRD_GetEventNotification(NotificationEvent *event, u32 count, u32 *recievedNotifCount);
/** /**
* @brief Returns the friend code using the given principal ID. * @brief Returns the friend code using the given principal ID.

View File

@ -233,7 +233,7 @@ Result FRD_GetMyComment(char *comment, size_t max_size)
return (Result)cmdbuf[1]; return (Result)cmdbuf[1];
} }
Result FRD_GetFriendKeyList(FriendKey *friendKeyList, size_t *num, size_t offset, size_t size) Result FRD_GetFriendKeyList(FriendKey *friendKeyList, u32 *num, u32 offset, u32 size)
{ {
Result ret = 0; Result ret = 0;
u32 *cmdbuf = getThreadCommandBuffer(); u32 *cmdbuf = getThreadCommandBuffer();
@ -304,19 +304,19 @@ Result FRD_GetFriendPlayingGame(GameDescription *desc, const FriendKey *friendKe
return (Result)cmdbuf[1]; return (Result)cmdbuf[1];
} }
Result FRD_GetFriendFavouriteGame(GameDescription *desc, const FriendKey *friendKeyList, size_t size) Result FRD_GetFriendFavouriteGame(GameDescription *desc, const FriendKey *friendKeyList, u32 count)
{ {
Result ret = 0; Result ret = 0;
u32 *cmdbuf = getThreadCommandBuffer(); u32 *cmdbuf = getThreadCommandBuffer();
cmdbuf[0] = IPC_MakeHeader(0x19,1,2); // 0x190042 cmdbuf[0] = IPC_MakeHeader(0x19,1,2); // 0x190042
cmdbuf[1] = size; cmdbuf[1] = count;
cmdbuf[2] = (size << 18) | 2; cmdbuf[2] = (count << 18) | 2;
cmdbuf[3] = (u32)friendKeyList; cmdbuf[3] = (u32)friendKeyList;
u32 *staticbuf = getThreadStaticBuffers(); u32 *staticbuf = getThreadStaticBuffers();
staticbuf[0] = (size << 18) | 2; staticbuf[0] = (count << 18) | 2;
staticbuf[1] = (u32)desc; staticbuf[1] = (u32)desc;
if (R_FAILED(svcSendSyncRequest(frdHandle))) return ret; if (R_FAILED(svcSendSyncRequest(frdHandle))) return ret;
@ -324,7 +324,7 @@ Result FRD_GetFriendFavouriteGame(GameDescription *desc, const FriendKey *friend
return (Result)cmdbuf[1]; return (Result)cmdbuf[1];
} }
Result FRD_IsFromFriendList(FriendKey *friendKeyList, bool *isFromList) Result FRD_IsInFriendList(FriendKey *friendKeyList, bool *isFromList)
{ {
Result ret = 0; Result ret = 0;
u32 *cmdbuf = getThreadCommandBuffer(); u32 *cmdbuf = getThreadCommandBuffer();
@ -372,16 +372,16 @@ Result FRD_AttachToEventNotification(Handle event)
return (Result)cmdbuf[1]; return (Result)cmdbuf[1];
} }
Result FRD_GetEventNotification(NotificationEvent *event, size_t size, u32 *recievedNotifCount) Result FRD_GetEventNotification(NotificationEvent *event, u32 count, u32 *recievedNotifCount)
{ {
Result ret = 0; Result ret = 0;
u32 *cmdbuf = getThreadCommandBuffer(); u32 *cmdbuf = getThreadCommandBuffer();
cmdbuf[0] = IPC_MakeHeader(0x22,1,0); //0x220040 cmdbuf[0] = IPC_MakeHeader(0x22,1,0); //0x220040
cmdbuf[1] = (u32)size; cmdbuf[1] = count;
u32 *staticbuf = getThreadStaticBuffers(); u32 *staticbuf = getThreadStaticBuffers();
staticbuf[0] = 0x60000 * size | 2; staticbuf[0] = 0x60000 * count | 2;
staticbuf[1] = (u32)event; staticbuf[1] = (u32)event;
if (R_FAILED(ret = svcSendSyncRequest(frdHandle))) return ret; if (R_FAILED(ret = svcSendSyncRequest(frdHandle))) return ret;