Profile Selector: Difference between revisions
No edit summary |
|||
(3 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
This is the applet presented when launching a game that allows the user to select a user. | This is the applet presented when launching a game that allows the user to select a user. | ||
See [[AM_services#Library_Applets]] | See [[AM_services#Library_Applets]]. | ||
== Library Applet Versions == | == Library Applet Versions == | ||
Line 87: | Line 87: | ||
|- | |- | ||
| 12 || [7.0.0+] UserCreatorForImmediateNaLoginTest | | 12 || [7.0.0+] UserCreatorForImmediateNaLoginTest | ||
|- | |||
| 13 || [13.0.0+] UserQualificationPromoter | |||
|} | |} | ||
Line 108: | Line 110: | ||
| 0x84 || 0x1 || [6.0.0+] u8 isUnqualifiedUserSelectable | | 0x84 || 0x1 || [6.0.0+] u8 isUnqualifiedUserSelectable | ||
|} | |} | ||
ShowUserSelector* calls ShowUserSelectorCommon for launching the applet, which does the following: | |||
* When isSkipEnabled is set, the first user in invalidUidList must not be set, and additionalSelect must be 0 (asserting otherwise). When enabled [[Account_services#TrySelectUserWithoutInteraction|TrySelectUserWithoutInteraction]] will be used to select the user (with isNetworkServiceAccountRequired), in this case the applet will only be launched if that cmd doesn't return an user. | |||
== UserSelectionSettingsForSystemService == | == UserSelectionSettingsForSystemService == | ||
Line 124: | Line 129: | ||
== UiReturnArg == | == UiReturnArg == | ||
This is "nn::account::UiReturnArg". | This is "nn::account::UiReturnArg". This is the struct for the output storage. | ||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
Line 130: | Line 135: | ||
! Offset || Size || Description | ! Offset || Size || Description | ||
|- | |- | ||
| 0x0 || 0x8 || Result | | 0x0 || 0x8 || Result. Returned directly as the Result when launching is successful. | ||
|- | |- | ||
| 0x8 || 0x10 || Uid of selected user. | | 0x8 || 0x10 || Uid of selected user, only used with [[#UiMode|UserSelector]] when no error is thrown (see above Result). | ||
|} | |} | ||
Line 150: | Line 155: | ||
== UserSelectionPurpose == | == UserSelectionPurpose == | ||
This is "nn::account::UserSelectionPurpose". | This is "nn::account::UserSelectionPurpose". This controls the UI message text to display with [[#UiMode|UserSelector]]. Invalid values are handled as value 0. | ||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
|- | |- | ||
! Value || Description | ! Value || Description || UI message text | ||
|- | |- | ||
| 0 || General | | 0 || General || "Select a user." | ||
|- | |- | ||
| 1 || GameCardRegistration | | 1 || [2.0.0+] GameCardRegistration || "Who will receive the points?" | ||
|- | |- | ||
| 2 || EShopLaunch | | 2 || [2.0.0+] EShopLaunch || "Who is using Nintendo eShop?" | ||
|- | |- | ||
| 3 || EShopItemShow | | 3 || [2.0.0+] EShopItemShow || "Who is making this purchase?" | ||
|- | |- | ||
| 4 || PicturePost | | 4 || [2.0.0+] PicturePost || "Who is posting?" | ||
|- | |- | ||
| 5 || NintendoAccountLinkage | | 5 || [2.0.0+] NintendoAccountLinkage || "Select a user to link to a Nintendo Account." | ||
|- | |- | ||
| 6 || SettingsUpdate | | 6 || [2.0.0+] SettingsUpdate || "Change settings for which user?" | ||
|- | |- | ||
| 7 || SaveDataDeletion | | 7 || [2.0.0+] SaveDataDeletion || "Format data for which user?" | ||
|- | |- | ||
| 8 || UserMigration | | 8 || [4.0.0+] UserMigration || "Which user will be transferred to another console?" | ||
|- | |- | ||
| 9 || SaveDataTransfer(?) | | 9 || [8.0.0+] SaveDataTransfer(?) || "Send save data for which user?" | ||
|} | |} | ||
== Usage == | == Usage == | ||
User-processes should push a common arguments struct and the | User-processes should push a common arguments struct and [[#UiSettings]]. Official sw can optionally push an additional storage from [[Applet_Manager_services#CreateTransferMemoryStorage|CreateTransferMemoryStorage]] with flag=0 using an input buffer when that input buffer is not NULL, however sdknso itself doesn't use this besides a wrapper func which sdknso itself doesn't call (the applet itself ignores this storage, at least with [9.1.0+]). After launching the applet and waiting for it to finish, on success the output storage [[#UiReturnArg]] should be popped. | ||
[[Category:Library Applets]] | [[Category:Library Applets]] |