diff --git a/nx/include/switch/applets/friends_la.h b/nx/include/switch/applets/friends_la.h index 2b0f0d3d..7f8d79ff 100644 --- a/nx/include/switch/applets/friends_la.h +++ b/nx/include/switch/applets/friends_la.h @@ -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); diff --git a/nx/include/switch/applets/web.h b/nx/include/switch/applets/web.h index 954e4b79..b1b306b7 100644 --- a/nx/include/switch/applets/web.h +++ b/nx/include/switch/applets/web.h @@ -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. diff --git a/nx/include/switch/runtime/devices/fs_dev.h b/nx/include/switch/runtime/devices/fs_dev.h index e8ab490f..b6887f38 100644 --- a/nx/include/switch/runtime/devices/fs_dev.h +++ b/nx/include/switch/runtime/devices/fs_dev.h @@ -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); diff --git a/nx/include/switch/services/acc.h b/nx/include/switch/services/acc.h index a24d62d7..fb7b5d2c 100644 --- a/nx/include/switch/services/acc.h +++ b/nx/include/switch/services/acc.h @@ -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); diff --git a/nx/include/switch/services/applet.h b/nx/include/switch/services/applet.h index 9c081344..a7dc60ba 100644 --- a/nx/include/switch/services/applet.h +++ b/nx/include/switch/services/applet.h @@ -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. diff --git a/nx/include/switch/services/capsu.h b/nx/include/switch/services/capsu.h index 5c2f7a81..aa7c0ea8 100644 --- a/nx/include/switch/services/capsu.h +++ b/nx/include/switch/services/capsu.h @@ -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. diff --git a/nx/include/switch/services/fs.h b/nx/include/switch/services/fs.h index b4770eed..6003c62d 100644 --- a/nx/include/switch/services/fs.h +++ b/nx/include/switch/services/fs.h @@ -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. diff --git a/nx/include/switch/services/pdm.h b/nx/include/switch/services/pdm.h index 3b76407a..cdb75006 100644 --- a/nx/include/switch/services/pdm.h +++ b/nx/include/switch/services/pdm.h @@ -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. diff --git a/nx/source/applets/friends_la.c b/nx/source/applets/friends_la.c index 8158cef1..d1dc7fe1 100644 --- a/nx/source/applets/friends_la.c +++ b/nx/source/applets/friends_la.c @@ -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); } diff --git a/nx/source/applets/web.c b/nx/source/applets/web.c index e7126892..e7153ede 100644 --- a/nx/source/applets/web.c +++ b/nx/source/applets/web.c @@ -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) { diff --git a/nx/source/runtime/devices/fs_dev.c b/nx/source/runtime/devices/fs_dev.c index f72722dd..385b345a 100644 --- a/nx/source/runtime/devices/fs_dev.c +++ b/nx/source/runtime/devices/fs_dev.c @@ -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); diff --git a/nx/source/services/acc.c b/nx/source/services/acc.c index 03742724..5efa7134 100644 --- a/nx/source/services/acc.c +++ b/nx/source/services/acc.c @@ -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, ); diff --git a/nx/source/services/applet.c b/nx/source/services/applet.c index f3aea127..09a08ceb 100644 --- a/nx/source/services/applet.c +++ b/nx/source/services/applet.c @@ -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); diff --git a/nx/source/services/capsu.c b/nx/source/services/capsu.c index 6abc23c3..ded78e12 100644 --- a/nx/source/services/capsu.c +++ b/nx/source/services/capsu.c @@ -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); diff --git a/nx/source/services/fs.c b/nx/source/services/fs.c index 8be4876e..d09e7da3 100644 --- a/nx/source/services/fs.c +++ b/nx/source/services/fs.c @@ -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); diff --git a/nx/source/services/pdm.c b/nx/source/services/pdm.c index fa3224ab..6b34b1f0 100644 --- a/nx/source/services/pdm.c +++ b/nx/source/services/pdm.c @@ -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) } }, );