mirror of
https://github.com/switchbrew/libnx.git
synced 2025-06-21 12:32:40 +02:00
Pass plain AccountUid inputs by value instead of by non-const pointer
This commit is contained in:
parent
13fbde91b0
commit
47b0403333
@ -36,7 +36,7 @@ typedef struct {
|
||||
* @brief Launches the applet with ::FriendsLaArgType_ShowFriendList, the specified input, and playStartupSound=false.
|
||||
* @param[in] userID \ref AccountUid
|
||||
*/
|
||||
Result friendsLaShowFriendList(AccountUid *userID);
|
||||
Result friendsLaShowFriendList(AccountUid userID);
|
||||
|
||||
/**
|
||||
* @brief Launches the applet with ::FriendsLaArgType_ShowUserDetailInfo, the specified input, and playStartupSound=false.
|
||||
@ -45,7 +45,7 @@ Result friendsLaShowFriendList(AccountUid *userID);
|
||||
* @param[in] first_inAppScreenName First \ref FriendsInAppScreenName.
|
||||
* @param[in] second_inAppScreenName Second \ref FriendsInAppScreenName.
|
||||
*/
|
||||
Result friendsLaShowUserDetailInfo(AccountUid *userID, u64 networkServiceAccountId, const FriendsInAppScreenName *first_inAppScreenName, const FriendsInAppScreenName *second_inAppScreenName);
|
||||
Result friendsLaShowUserDetailInfo(AccountUid userID, u64 networkServiceAccountId, const FriendsInAppScreenName *first_inAppScreenName, const FriendsInAppScreenName *second_inAppScreenName);
|
||||
|
||||
/**
|
||||
* @brief Launches the applet with ::FriendsLaArgType_StartSendingFriendRequest, the specified input, and playStartupSound=false. On success, this will load the output Result from the output storage.
|
||||
@ -54,41 +54,41 @@ Result friendsLaShowUserDetailInfo(AccountUid *userID, u64 networkServiceAccount
|
||||
* @param[in] first_inAppScreenName First \ref FriendsInAppScreenName.
|
||||
* @param[in] second_inAppScreenName Second \ref FriendsInAppScreenName.
|
||||
*/
|
||||
Result friendsLaStartSendingFriendRequest(AccountUid *userID, u64 networkServiceAccountId, const FriendsInAppScreenName *first_inAppScreenName, const FriendsInAppScreenName *second_inAppScreenName);
|
||||
Result friendsLaStartSendingFriendRequest(AccountUid userID, u64 networkServiceAccountId, const FriendsInAppScreenName *first_inAppScreenName, const FriendsInAppScreenName *second_inAppScreenName);
|
||||
|
||||
/**
|
||||
* @brief Launches the applet with ::FriendsLaArgType_ShowMethodsOfSendingFriendRequest, the specified input, and playStartupSound=false.
|
||||
* @param[in] userID \ref AccountUid
|
||||
*/
|
||||
Result friendsLaShowMethodsOfSendingFriendRequest(AccountUid *userID);
|
||||
Result friendsLaShowMethodsOfSendingFriendRequest(AccountUid userID);
|
||||
|
||||
/**
|
||||
* @brief Launches the applet with ::FriendsLaArgType_StartFacedFriendRequest, the specified input, and playStartupSound=false.
|
||||
* @param[in] userID \ref AccountUid
|
||||
*/
|
||||
Result friendsLaStartFacedFriendRequest(AccountUid *userID);
|
||||
Result friendsLaStartFacedFriendRequest(AccountUid userID);
|
||||
|
||||
/**
|
||||
* @brief Launches the applet with ::FriendsLaArgType_ShowReceivedFriendRequestList, the specified input, and playStartupSound=false.
|
||||
* @param[in] userID \ref AccountUid
|
||||
*/
|
||||
Result friendsLaShowReceivedFriendRequestList(AccountUid *userID);
|
||||
Result friendsLaShowReceivedFriendRequestList(AccountUid userID);
|
||||
|
||||
/**
|
||||
* @brief Launches the applet with ::FriendsLaArgType_ShowBlockedUserList, the specified input, and playStartupSound=false.
|
||||
* @param[in] userID \ref AccountUid
|
||||
*/
|
||||
Result friendsLaShowBlockedUserList(AccountUid *userID);
|
||||
Result friendsLaShowBlockedUserList(AccountUid userID);
|
||||
|
||||
/**
|
||||
* @brief Launches the applet with ::FriendsLaArgType_ShowMyProfile, the specified input, and playStartupSound=false.
|
||||
* @param[in] userID \ref AccountUid
|
||||
*/
|
||||
Result friendsLaShowMyProfile(AccountUid *userID);
|
||||
Result friendsLaShowMyProfile(AccountUid userID);
|
||||
|
||||
/**
|
||||
* @brief Same as \ref friendsLaShowMyProfile except with playStartupSound=true.
|
||||
* @param[in] userID \ref AccountUid
|
||||
*/
|
||||
Result friendsLaShowMyProfileForHomeMenu(AccountUid *userID);
|
||||
Result friendsLaShowMyProfileForHomeMenu(AccountUid userID);
|
||||
|
||||
|
@ -347,7 +347,7 @@ Result webConfigSetWhitelist(WebCommonConfig* config, const char* whitelist);
|
||||
* @param config WebCommonConfig object.
|
||||
* @param uid \ref AccountUid
|
||||
*/
|
||||
Result webConfigSetUid(WebCommonConfig* config, AccountUid *uid);
|
||||
Result webConfigSetUid(WebCommonConfig* config, AccountUid uid);
|
||||
|
||||
/**
|
||||
* @brief Sets the Share CapsAlbumEntry.
|
||||
|
@ -31,7 +31,7 @@ NX_CONSTEXPR FsDirectoryEntry* fsdevDirGetEntries(fsdev_dir_t *dir)
|
||||
Result fsdevMountSdmc(void);
|
||||
|
||||
/// Mounts the specified save data.
|
||||
Result fsdevMountSaveData(const char *name, u64 titleID, AccountUid *userID);
|
||||
Result fsdevMountSaveData(const char *name, u64 titleID, AccountUid userID);
|
||||
|
||||
/// Mounts the specified system save data.
|
||||
Result fsdevMountSystemSaveData(const char *name, u64 saveID);
|
||||
|
@ -30,7 +30,7 @@ typedef struct {
|
||||
/// UserData
|
||||
typedef struct {
|
||||
u32 unk_x0; ///< Unknown.
|
||||
u32 iconID; ///< Icon ID. 0 = Mii, the rest are character icon IDs.
|
||||
u32 iconID; ///< Icon ID. 0 = Mii, the rest are character icon IDs.
|
||||
u8 iconBackgroundColorID; ///< Profile icon background color ID
|
||||
u8 unk_x9[0x7]; ///< Unknown.
|
||||
u8 miiID[0x10]; ///< Some ID related to the Mii? All zeros when a character icon is used.
|
||||
@ -74,7 +74,7 @@ Result accountListAllUsers(AccountUid* userIDs, s32 max_userIDs, s32 *actual_tot
|
||||
Result accountGetLastOpenedUser(AccountUid *userID);
|
||||
|
||||
/// Get an AccountProfile for the specified userID.
|
||||
Result accountGetProfile(AccountProfile* out, const AccountUid *userID);
|
||||
Result accountGetProfile(AccountProfile* out, AccountUid userID);
|
||||
|
||||
/// Close the AccountProfile.
|
||||
void accountProfileClose(AccountProfile* profile);
|
||||
|
@ -1430,7 +1430,7 @@ Result appletQueryApplicationPlayStatistics(PdmApplicationPlayStatistics *stats,
|
||||
* @param[in] count Total entries in the input/output arrays.
|
||||
* @param[out] total_out Total output entries.
|
||||
*/
|
||||
Result appletQueryApplicationPlayStatisticsByUid(AccountUid *uid, PdmApplicationPlayStatistics *stats, const u64 *titleIDs, s32 count, s32 *total_out);
|
||||
Result appletQueryApplicationPlayStatisticsByUid(AccountUid uid, PdmApplicationPlayStatistics *stats, const u64 *titleIDs, s32 count, s32 *total_out);
|
||||
|
||||
/**
|
||||
* @brief Launches Application title {current_titleID}+programIndex. This will enter an infinite-sleep-loop on success.
|
||||
@ -2216,7 +2216,7 @@ Result appletInvalidateTransitionLayer(void);
|
||||
* @param[in] buffer Buffer containing the above storage data.
|
||||
* @param[in] size Size of the storage buffer.
|
||||
*/
|
||||
Result appletRequestLaunchApplicationWithUserAndArgumentForDebug(u64 titleID, AccountUid *userIDs, size_t total_userIDs, bool flag, const void* buffer, size_t size);
|
||||
Result appletRequestLaunchApplicationWithUserAndArgumentForDebug(u64 titleID, const AccountUid *userIDs, size_t total_userIDs, bool flag, const void* buffer, size_t size);
|
||||
|
||||
/**
|
||||
* @brief Gets the \ref AppletResourceUsageInfo.
|
||||
|
@ -48,7 +48,7 @@ Result capsuGetAlbumFileListDeprecated1(CapsApplicationAlbumFileEntry *entries,
|
||||
* @param[in] userID \ref AccountUid
|
||||
* @param[out] total_entries Total output entries.
|
||||
*/
|
||||
Result capsuGetAlbumFileListDeprecated2(CapsApplicationAlbumFileEntry *entries, s32 count, CapsContentType type, const CapsAlbumFileDateTime *start_datetime, const CapsAlbumFileDateTime *end_datetime, AccountUid *userID, s32 *total_entries);
|
||||
Result capsuGetAlbumFileListDeprecated2(CapsApplicationAlbumFileEntry *entries, s32 count, CapsContentType type, const CapsAlbumFileDateTime *start_datetime, const CapsAlbumFileDateTime *end_datetime, AccountUid userID, s32 *total_entries);
|
||||
|
||||
/**
|
||||
* @brief Gets a listing of \ref CapsApplicationAlbumEntry.
|
||||
@ -73,7 +73,7 @@ Result capsuGetAlbumFileList3(CapsApplicationAlbumEntry *entries, s32 count, Cap
|
||||
* @param[in] userID \ref AccountUid
|
||||
* @param[out] total_entries Total output entries.
|
||||
*/
|
||||
Result capsuGetAlbumFileList4(CapsApplicationAlbumEntry *entries, s32 count, CapsContentType type, const CapsAlbumFileDateTime *start_datetime, const CapsAlbumFileDateTime *end_datetime, AccountUid *userID, s32 *total_entries);
|
||||
Result capsuGetAlbumFileList4(CapsApplicationAlbumEntry *entries, s32 count, CapsContentType type, const CapsAlbumFileDateTime *start_datetime, const CapsAlbumFileDateTime *end_datetime, AccountUid userID, s32 *total_entries);
|
||||
|
||||
/**
|
||||
* @brief Deletes the specified AlbumFile.
|
||||
|
@ -319,14 +319,14 @@ Result fsGetGlobalAccessLogMode(u32* out_mode);
|
||||
// todo: Rest of commands here
|
||||
|
||||
// Wrapper(s) for fsCreateSaveDataFileSystemBySystemSaveDataId.
|
||||
Result fsCreate_SystemSaveDataWithOwner(FsSaveDataSpaceId saveDataSpaceId, u64 saveID, AccountUid *userID, u64 ownerId, u64 size, u64 journalSize, u32 flags);
|
||||
Result fsCreate_SystemSaveDataWithOwner(FsSaveDataSpaceId saveDataSpaceId, u64 saveID, AccountUid userID, u64 ownerId, u64 size, u64 journalSize, u32 flags);
|
||||
Result fsCreate_SystemSaveData(FsSaveDataSpaceId saveDataSpaceId, u64 saveID, u64 size, u64 journalSize, u32 flags);
|
||||
|
||||
/// FsFileSystem can be mounted with fs_dev for use with stdio, see fs_dev.h.
|
||||
|
||||
/// Wrapper(s) for fsOpenSaveDataFileSystem.
|
||||
/// See FsSave for titleID and userID.
|
||||
Result fsOpen_SaveData(FsFileSystem* out, u64 titleID, AccountUid *userID);
|
||||
Result fsOpen_SaveData(FsFileSystem* out, u64 titleID, AccountUid userID);
|
||||
|
||||
/// Wrapper for fsOpenSaveDataFileSystemBySystemSaveDataId.
|
||||
/// WARNING: You can brick when writing to SystemSaveData, if the data is corrupted etc.
|
||||
|
@ -186,7 +186,7 @@ Result pdmqryQueryPlayStatisticsByApplicationId(u64 titleID, PdmPlayStatistics *
|
||||
* @param[in] uid \ref AccountUid
|
||||
* @param[out] stats \ref PdmPlayStatistics
|
||||
*/
|
||||
Result pdmqryQueryPlayStatisticsByApplicationIdAndUserAccountId(u64 titleID, AccountUid *uid, PdmPlayStatistics *stats);
|
||||
Result pdmqryQueryPlayStatisticsByApplicationIdAndUserAccountId(u64 titleID, AccountUid uid, PdmPlayStatistics *stats);
|
||||
|
||||
/**
|
||||
* @brief Gets \ref PdmLastPlayTime for the specified titles.
|
||||
@ -232,7 +232,7 @@ Result pdmqryQueryAccountEvent(s32 entry_index, PdmAccountEvent *events, s32 cou
|
||||
* @param[in] count Max entries in the output array.
|
||||
* @param[out] total_out Total output entries.
|
||||
*/
|
||||
Result pdmqryQueryAccountPlayEvent(s32 entry_index, AccountUid *uid, PdmAccountPlayEvent *events, s32 count, s32 *total_out);
|
||||
Result pdmqryQueryAccountPlayEvent(s32 entry_index, AccountUid uid, PdmAccountPlayEvent *events, s32 count, s32 *total_out);
|
||||
|
||||
/**
|
||||
* @brief Gets range fields which can then be used with \ref pdmqryQueryAccountPlayEvent.
|
||||
@ -241,7 +241,7 @@ Result pdmqryQueryAccountPlayEvent(s32 entry_index, AccountUid *uid, PdmAccountP
|
||||
* @param[out] start_entry_index Start entry index.
|
||||
* @param[out] end_entry_index End entry index.
|
||||
*/
|
||||
Result pdmqryGetAvailableAccountPlayEventRange(AccountUid *uid, s32 *total_entries, s32 *start_entry_index, s32 *end_entry_index);
|
||||
Result pdmqryGetAvailableAccountPlayEventRange(AccountUid uid, s32 *total_entries, s32 *start_entry_index, s32 *end_entry_index);
|
||||
|
||||
/**
|
||||
* @brief Gets a list of titles played by the specified user.
|
||||
@ -251,10 +251,10 @@ Result pdmqryGetAvailableAccountPlayEventRange(AccountUid *uid, s32 *total_entri
|
||||
* @param[in] count Max entries in the output array.
|
||||
* @param[out] total_out Total output entries.
|
||||
*/
|
||||
Result pdmqryQueryRecentlyPlayedApplication(AccountUid *uid, u64 *titleIDs, s32 count, s32 *total_out);
|
||||
Result pdmqryQueryRecentlyPlayedApplication(AccountUid uid, u64 *titleIDs, s32 count, s32 *total_out);
|
||||
|
||||
/**
|
||||
* @brief Gets an Event which is signaled when logging a new \ref PdmPlayEvent which would be available via \ref pdmqryQueryAccountEvent, where PdmPlayEvent::eventData::account::type is 0.
|
||||
* @brief Gets an Event which is signaled when logging a new \ref PdmPlayEvent which would be available via \ref pdmqryQueryAccountEvent, where PdmPlayEvent::eventData::account::type is 0.
|
||||
* @note Only available with [6.0.0+].
|
||||
* @note The Event must be closed by the user once finished with it.
|
||||
* @param[out] out_event Output Event with autoclear=false.
|
||||
|
@ -26,51 +26,51 @@ static Result _friendsLaShow(const FriendsLaArg *arg, bool playStartupSound) {
|
||||
return rc;
|
||||
}
|
||||
|
||||
static Result _friendsLaShowSimple(FriendsLaArgType type, AccountUid *userID, bool playStartupSound) {
|
||||
FriendsLaArg arg = {.type = type, .userID = *userID};
|
||||
static Result _friendsLaShowSimple(FriendsLaArgType type, AccountUid userID, bool playStartupSound) {
|
||||
FriendsLaArg arg = {.type = type, .userID = userID};
|
||||
|
||||
return _friendsLaShow(&arg, playStartupSound);
|
||||
}
|
||||
|
||||
static Result _friendsLaShowAll(FriendsLaArgType type, AccountUid *userID, u64 networkServiceAccountId, const FriendsInAppScreenName *first_inAppScreenName, const FriendsInAppScreenName *second_inAppScreenName, bool playStartupSound) {
|
||||
FriendsLaArg arg = {.type = type, .userID = *userID, .networkServiceAccountId = networkServiceAccountId, .first_inAppScreenName = *first_inAppScreenName, .second_inAppScreenName = *second_inAppScreenName};
|
||||
static Result _friendsLaShowAll(FriendsLaArgType type, AccountUid userID, u64 networkServiceAccountId, const FriendsInAppScreenName *first_inAppScreenName, const FriendsInAppScreenName *second_inAppScreenName, bool playStartupSound) {
|
||||
FriendsLaArg arg = {.type = type, .userID = userID, .networkServiceAccountId = networkServiceAccountId, .first_inAppScreenName = *first_inAppScreenName, .second_inAppScreenName = *second_inAppScreenName};
|
||||
|
||||
return _friendsLaShow(&arg, playStartupSound);
|
||||
}
|
||||
|
||||
Result friendsLaShowFriendList(AccountUid *userID) {
|
||||
Result friendsLaShowFriendList(AccountUid userID) {
|
||||
return _friendsLaShowSimple(FriendsLaArgType_ShowFriendList, userID, false);
|
||||
}
|
||||
|
||||
Result friendsLaShowUserDetailInfo(AccountUid *userID, u64 networkServiceAccountId, const FriendsInAppScreenName *first_inAppScreenName, const FriendsInAppScreenName *second_inAppScreenName) {
|
||||
Result friendsLaShowUserDetailInfo(AccountUid userID, u64 networkServiceAccountId, const FriendsInAppScreenName *first_inAppScreenName, const FriendsInAppScreenName *second_inAppScreenName) {
|
||||
return _friendsLaShowAll(FriendsLaArgType_ShowUserDetailInfo, userID, networkServiceAccountId, first_inAppScreenName, second_inAppScreenName, false);
|
||||
}
|
||||
|
||||
Result friendsLaStartSendingFriendRequest(AccountUid *userID, u64 networkServiceAccountId, const FriendsInAppScreenName *first_inAppScreenName, const FriendsInAppScreenName *second_inAppScreenName) {
|
||||
Result friendsLaStartSendingFriendRequest(AccountUid userID, u64 networkServiceAccountId, const FriendsInAppScreenName *first_inAppScreenName, const FriendsInAppScreenName *second_inAppScreenName) {
|
||||
return _friendsLaShowAll(FriendsLaArgType_StartSendingFriendRequest, userID, networkServiceAccountId, first_inAppScreenName, second_inAppScreenName, false);
|
||||
}
|
||||
|
||||
Result friendsLaShowMethodsOfSendingFriendRequest(AccountUid *userID) {
|
||||
Result friendsLaShowMethodsOfSendingFriendRequest(AccountUid userID) {
|
||||
return _friendsLaShowSimple(FriendsLaArgType_ShowMethodsOfSendingFriendRequest, userID, false);
|
||||
}
|
||||
|
||||
Result friendsLaStartFacedFriendRequest(AccountUid *userID) {
|
||||
Result friendsLaStartFacedFriendRequest(AccountUid userID) {
|
||||
return _friendsLaShowSimple(FriendsLaArgType_StartFacedFriendRequest, userID, false);
|
||||
}
|
||||
|
||||
Result friendsLaShowReceivedFriendRequestList(AccountUid *userID) {
|
||||
Result friendsLaShowReceivedFriendRequestList(AccountUid userID) {
|
||||
return _friendsLaShowSimple(FriendsLaArgType_ShowReceivedFriendRequestList, userID, false);
|
||||
}
|
||||
|
||||
Result friendsLaShowBlockedUserList(AccountUid *userID) {
|
||||
Result friendsLaShowBlockedUserList(AccountUid userID) {
|
||||
return _friendsLaShowSimple(FriendsLaArgType_ShowBlockedUserList, userID, false);
|
||||
}
|
||||
|
||||
Result friendsLaShowMyProfile(AccountUid *userID) {
|
||||
Result friendsLaShowMyProfile(AccountUid userID) {
|
||||
return _friendsLaShowSimple(FriendsLaArgType_ShowMyProfile, userID, false);
|
||||
}
|
||||
|
||||
Result friendsLaShowMyProfileForHomeMenu(AccountUid *userID) {
|
||||
Result friendsLaShowMyProfileForHomeMenu(AccountUid userID) {
|
||||
return _friendsLaShowSimple(FriendsLaArgType_ShowMyProfile, userID, true);
|
||||
}
|
||||
|
||||
|
@ -355,7 +355,7 @@ Result webShareCreate(WebCommonConfig* config, WebShareStartPage page) {
|
||||
_webArgInitialize(config, AppletId_loginShare, WebShimKind_Share);
|
||||
|
||||
rc = webConfigSetLeftStickMode(config, WebLeftStickMode_Cursor);
|
||||
if (R_SUCCEEDED(rc)) rc = webConfigSetUid(config, &uid);
|
||||
if (R_SUCCEEDED(rc)) rc = webConfigSetUid(config, uid);
|
||||
if (R_SUCCEEDED(rc)) rc = webConfigSetDisplayUrlKind(config, true);
|
||||
|
||||
if (R_SUCCEEDED(rc)) rc = _webConfigSetU8(config, WebArgType_Unknown14, 1);
|
||||
@ -377,7 +377,7 @@ Result webLobbyCreate(WebCommonConfig* config) {
|
||||
rc = webConfigSetLeftStickMode(config, WebLeftStickMode_Cursor);
|
||||
if (R_SUCCEEDED(rc) && config->version >= 0x30000) rc = webConfigSetPointer(config, false); // Added to user-process init with [3.0.0+].
|
||||
|
||||
if (R_SUCCEEDED(rc)) rc = webConfigSetUid(config, &uid);
|
||||
if (R_SUCCEEDED(rc)) rc = webConfigSetUid(config, uid);
|
||||
|
||||
if (R_SUCCEEDED(rc)) rc = _webConfigSetU8(config, WebArgType_Unknown14, 1);
|
||||
if (R_SUCCEEDED(rc)) rc = _webConfigSetU8(config, WebArgType_Unknown15, 1);
|
||||
@ -404,10 +404,10 @@ Result webConfigSetWhitelist(WebCommonConfig* config, const char* whitelist) {
|
||||
return _webConfigSetString(config, WebArgType_Whitelist, whitelist, 0x1000);
|
||||
}
|
||||
|
||||
Result webConfigSetUid(WebCommonConfig* config, AccountUid *uid) {
|
||||
Result webConfigSetUid(WebCommonConfig* config, AccountUid uid) {
|
||||
WebShimKind shim = _webGetShimKind(config);
|
||||
if (shim != WebShimKind_Share && shim != WebShimKind_Web && shim != WebShimKind_Lobby) return MAKERESULT(Module_Libnx, LibnxError_NotInitialized);
|
||||
return _webTLVSet(config, WebArgType_Uid, uid, sizeof(*uid));
|
||||
return _webTLVSet(config, WebArgType_Uid, &uid, sizeof(uid));
|
||||
}
|
||||
|
||||
static Result _webConfigSetAlbumEntryTLV(WebCommonConfig* config, WebArgType type, const CapsAlbumEntry *entry) {
|
||||
|
@ -443,7 +443,7 @@ Result fsdevMountSdmc(void)
|
||||
return rc;
|
||||
}
|
||||
|
||||
Result fsdevMountSaveData(const char *name, u64 titleID, AccountUid *userID)
|
||||
Result fsdevMountSaveData(const char *name, u64 titleID, AccountUid userID)
|
||||
{
|
||||
FsFileSystem fs;
|
||||
Result rc = fsOpen_SaveData(&fs, titleID, userID);
|
||||
|
@ -115,8 +115,8 @@ Result accountGetLastOpenedUser(AccountUid *userID) {
|
||||
return serviceDispatchOut(&g_accSrv, 4, *userID);
|
||||
}
|
||||
|
||||
Result accountGetProfile(AccountProfile* out, const AccountUid *userID) {
|
||||
return serviceDispatchIn(&g_accSrv, 5, *userID,
|
||||
Result accountGetProfile(AccountProfile* out, AccountUid userID) {
|
||||
return serviceDispatchIn(&g_accSrv, 5, userID,
|
||||
.out_num_objects = 1,
|
||||
.out_objects = &out->s,
|
||||
);
|
||||
|
@ -2168,14 +2168,14 @@ Result appletQueryApplicationPlayStatistics(PdmApplicationPlayStatistics *stats,
|
||||
);
|
||||
}
|
||||
|
||||
Result appletQueryApplicationPlayStatisticsByUid(AccountUid *uid, PdmApplicationPlayStatistics *stats, const u64 *titleIDs, s32 count, s32 *total_out) {
|
||||
Result appletQueryApplicationPlayStatisticsByUid(AccountUid uid, PdmApplicationPlayStatistics *stats, const u64 *titleIDs, s32 count, s32 *total_out) {
|
||||
if (!serviceIsActive(&g_appletSrv) || !_appletIsApplication())
|
||||
return MAKERESULT(Module_Libnx, LibnxError_NotInitialized);
|
||||
if (hosversionBefore(6,0,0))
|
||||
return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer);
|
||||
|
||||
serviceAssumeDomain(&g_appletIFunctions);
|
||||
return serviceDispatchInOut(&g_appletIFunctions, 111, *uid, *total_out,
|
||||
return serviceDispatchInOut(&g_appletIFunctions, 111, uid, *total_out,
|
||||
.buffer_attrs = {
|
||||
SfBufferAttr_HipcMapAlias | SfBufferAttr_Out,
|
||||
SfBufferAttr_HipcMapAlias | SfBufferAttr_In,
|
||||
@ -2651,7 +2651,7 @@ IPC_MAKE_CMD_IMPL(Result appletOpenMainApplication(AppletApplication *a),
|
||||
IPC_MAKE_CMD_IMPL(Result appletPerformSystemButtonPressing(AppletSystemButtonType type), &g_appletIDebugFunctions, 10, _appletCmdInU32, type)
|
||||
IPC_MAKE_CMD_IMPL(Result appletInvalidateTransitionLayer(void), &g_appletIDebugFunctions, 20, _appletCmdNoIO)
|
||||
|
||||
Result appletRequestLaunchApplicationWithUserAndArgumentForDebug(u64 titleID, AccountUid *userIDs, size_t total_userIDs, bool flag, const void* buffer, size_t size) {
|
||||
Result appletRequestLaunchApplicationWithUserAndArgumentForDebug(u64 titleID, const AccountUid *userIDs, size_t total_userIDs, bool flag, const void* buffer, size_t size) {
|
||||
if (hosversionBefore(6,0,0))
|
||||
return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer);
|
||||
|
||||
|
@ -173,7 +173,7 @@ static Result _capsuGetAlbumFileListAaeAruid(u32 cmd_id, void* entries, size_t e
|
||||
return rc;
|
||||
}
|
||||
|
||||
static Result _capsuGetAlbumFileListAaeUidAruid(u32 cmd_id, void* entries, size_t entrysize, s32 count, u8 type, const CapsAlbumFileDateTime *start_datetime, const CapsAlbumFileDateTime *end_datetime, AccountUid *userID, s32 *total_entries) {
|
||||
static Result _capsuGetAlbumFileListAaeUidAruid(u32 cmd_id, void* entries, size_t entrysize, s32 count, u8 type, const CapsAlbumFileDateTime *start_datetime, const CapsAlbumFileDateTime *end_datetime, AccountUid userID, s32 *total_entries) {
|
||||
u64 AppletResourceUserId = 0;
|
||||
appletGetAppletResourceUserId(&AppletResourceUserId);
|
||||
|
||||
@ -183,7 +183,7 @@ static Result _capsuGetAlbumFileListAaeUidAruid(u32 cmd_id, void* entries, size_
|
||||
CapsAlbumFileDateTime end_datetime;
|
||||
AccountUid userID;
|
||||
u64 AppletResourceUserId;
|
||||
} in = { type, *start_datetime, *end_datetime, *userID, AppletResourceUserId };
|
||||
} in = { type, *start_datetime, *end_datetime, userID, AppletResourceUserId };
|
||||
|
||||
u64 total_out=0;
|
||||
Result rc = serviceDispatchInOut(&g_capsuSrv, cmd_id, in, total_out,
|
||||
@ -264,7 +264,7 @@ Result capsuGetAlbumFileListDeprecated1(CapsApplicationAlbumFileEntry *entries,
|
||||
return _capsuGetAlbumFileListAaeAruid(140, entries, sizeof(CapsApplicationAlbumFileEntry), count, type, start_datetime ? start_datetime : &default_start, end_datetime ? end_datetime : &default_end, total_entries);
|
||||
}
|
||||
|
||||
Result capsuGetAlbumFileListDeprecated2(CapsApplicationAlbumFileEntry *entries, s32 count, CapsContentType type, const CapsAlbumFileDateTime *start_datetime, const CapsAlbumFileDateTime *end_datetime, AccountUid *userID, s32 *total_entries) {
|
||||
Result capsuGetAlbumFileListDeprecated2(CapsApplicationAlbumFileEntry *entries, s32 count, CapsContentType type, const CapsAlbumFileDateTime *start_datetime, const CapsAlbumFileDateTime *end_datetime, AccountUid userID, s32 *total_entries) {
|
||||
if (hosversionBefore(6,0,0))
|
||||
return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer);
|
||||
|
||||
@ -284,7 +284,7 @@ Result capsuGetAlbumFileList3(CapsApplicationAlbumEntry *entries, s32 count, Cap
|
||||
return _capsuGetAlbumFileListAaeAruid(142, entries, sizeof(CapsApplicationAlbumEntry), count, type, start_datetime ? start_datetime : &default_start, end_datetime ? end_datetime : &default_end, total_entries);
|
||||
}
|
||||
|
||||
Result capsuGetAlbumFileList4(CapsApplicationAlbumEntry *entries, s32 count, CapsContentType type, const CapsAlbumFileDateTime *start_datetime, const CapsAlbumFileDateTime *end_datetime, AccountUid *userID, s32 *total_entries) {
|
||||
Result capsuGetAlbumFileList4(CapsApplicationAlbumEntry *entries, s32 count, CapsContentType type, const CapsAlbumFileDateTime *start_datetime, const CapsAlbumFileDateTime *end_datetime, AccountUid userID, s32 *total_entries) {
|
||||
if (hosversionBefore(7,0,0))
|
||||
return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer);
|
||||
|
||||
|
@ -434,9 +434,9 @@ Result fsGetGlobalAccessLogMode(u32* out_mode) {
|
||||
}
|
||||
|
||||
// Wrapper(s) for fsCreateSaveDataFileSystemBySystemSaveDataId.
|
||||
Result fsCreate_SystemSaveDataWithOwner(FsSaveDataSpaceId saveDataSpaceId, u64 saveID, AccountUid *userID, u64 ownerId, u64 size, u64 journalSize, u32 flags) {
|
||||
Result fsCreate_SystemSaveDataWithOwner(FsSaveDataSpaceId saveDataSpaceId, u64 saveID, AccountUid userID, u64 ownerId, u64 size, u64 journalSize, u32 flags) {
|
||||
FsSave save = {
|
||||
.userID = *userID,
|
||||
.userID = userID,
|
||||
.saveID = saveID,
|
||||
};
|
||||
FsSaveCreate create = {
|
||||
@ -452,16 +452,16 @@ Result fsCreate_SystemSaveDataWithOwner(FsSaveDataSpaceId saveDataSpaceId, u64 s
|
||||
}
|
||||
|
||||
Result fsCreate_SystemSaveData(FsSaveDataSpaceId saveDataSpaceId, u64 saveID, u64 size, u64 journalSize, u32 flags) {
|
||||
return fsCreate_SystemSaveDataWithOwner(saveDataSpaceId, saveID, 0, 0, size, journalSize, flags);
|
||||
return fsCreate_SystemSaveDataWithOwner(saveDataSpaceId, saveID, (AccountUid){}, 0, size, journalSize, flags);
|
||||
}
|
||||
|
||||
// Wrapper(s) for fsOpenSaveDataFileSystem.
|
||||
Result fsOpen_SaveData(FsFileSystem* out, u64 titleID, AccountUid *userID) {
|
||||
Result fsOpen_SaveData(FsFileSystem* out, u64 titleID, AccountUid userID) {
|
||||
FsSave save;
|
||||
|
||||
memset(&save, 0, sizeof(save));
|
||||
save.titleID = titleID;
|
||||
save.userID = *userID;
|
||||
save.userID = userID;
|
||||
save.saveDataType = FsSaveDataType_SaveData;
|
||||
|
||||
return fsOpenSaveDataFileSystem(out, FsSaveDataSpaceId_NandUser, &save);
|
||||
|
@ -50,11 +50,11 @@ Result pdmqryQueryPlayStatisticsByApplicationId(u64 titleID, PdmPlayStatistics *
|
||||
return serviceDispatchInOut(&g_pdmqrySrv, 4, titleID, *stats);
|
||||
}
|
||||
|
||||
Result pdmqryQueryPlayStatisticsByApplicationIdAndUserAccountId(u64 titleID, AccountUid *uid, PdmPlayStatistics *stats) {
|
||||
Result pdmqryQueryPlayStatisticsByApplicationIdAndUserAccountId(u64 titleID, AccountUid uid, PdmPlayStatistics *stats) {
|
||||
const struct {
|
||||
u64 titleID;
|
||||
AccountUid uid;
|
||||
} in = { titleID, *uid };
|
||||
} in = { titleID, uid };
|
||||
|
||||
return serviceDispatchInOut(&g_pdmqrySrv, 5, in, *stats);
|
||||
}
|
||||
@ -96,14 +96,14 @@ Result pdmqryQueryAccountEvent(s32 entry_index, PdmAccountEvent *events, s32 cou
|
||||
return _pdmqryQueryEvent(entry_index, events, sizeof(PdmAccountEvent), count, total_out, 10);
|
||||
}
|
||||
|
||||
Result pdmqryQueryAccountPlayEvent(s32 entry_index, AccountUid *uid, PdmAccountPlayEvent *events, s32 count, s32 *total_out) {
|
||||
Result pdmqryQueryAccountPlayEvent(s32 entry_index, AccountUid uid, PdmAccountPlayEvent *events, s32 count, s32 *total_out) {
|
||||
if (hosversionBefore(4,0,0))
|
||||
return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer);
|
||||
|
||||
const struct {
|
||||
s32 entry_index;
|
||||
AccountUid uid;
|
||||
} in = { entry_index, *uid };
|
||||
} in = { entry_index, uid };
|
||||
|
||||
return serviceDispatchInOut(&g_pdmqrySrv, 11, in, *total_out,
|
||||
.buffer_attrs = { SfBufferAttr_HipcMapAlias | SfBufferAttr_Out },
|
||||
@ -111,7 +111,7 @@ Result pdmqryQueryAccountPlayEvent(s32 entry_index, AccountUid *uid, PdmAccountP
|
||||
);
|
||||
}
|
||||
|
||||
Result pdmqryGetAvailableAccountPlayEventRange(AccountUid *uid, s32 *total_entries, s32 *start_entry_index, s32 *end_entry_index) {
|
||||
Result pdmqryGetAvailableAccountPlayEventRange(AccountUid uid, s32 *total_entries, s32 *start_entry_index, s32 *end_entry_index) {
|
||||
if (hosversionBefore(4,0,0))
|
||||
return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer);
|
||||
|
||||
@ -121,7 +121,7 @@ Result pdmqryGetAvailableAccountPlayEventRange(AccountUid *uid, s32 *total_entri
|
||||
s32 end_entry_index;
|
||||
} out;
|
||||
|
||||
Result rc = serviceDispatchInOut(&g_pdmqrySrv, 12, *uid, out);
|
||||
Result rc = serviceDispatchInOut(&g_pdmqrySrv, 12, uid, out);
|
||||
if (R_SUCCEEDED(rc)) {
|
||||
if (total_entries) *total_entries = out.total_entries;
|
||||
if (start_entry_index) *start_entry_index = out.start_entry_index;
|
||||
@ -130,11 +130,11 @@ Result pdmqryGetAvailableAccountPlayEventRange(AccountUid *uid, s32 *total_entri
|
||||
return rc;
|
||||
}
|
||||
|
||||
Result pdmqryQueryRecentlyPlayedApplication(AccountUid *uid, u64 *titleIDs, s32 count, s32 *total_out) {
|
||||
Result pdmqryQueryRecentlyPlayedApplication(AccountUid uid, u64 *titleIDs, s32 count, s32 *total_out) {
|
||||
if (hosversionBefore(6,0,0))
|
||||
return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer);
|
||||
|
||||
return serviceDispatchInOut(&g_pdmqrySrv, 14, *uid, *total_out,
|
||||
return serviceDispatchInOut(&g_pdmqrySrv, 14, uid, *total_out,
|
||||
.buffer_attrs = { SfBufferAttr_HipcMapAlias | SfBufferAttr_Out },
|
||||
.buffers = { { titleIDs, count*sizeof(u64) } },
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user