mirror of
https://github.com/switchbrew/switch-examples.git
synced 2025-08-06 16:39:22 +02:00
add code to satisfy multiple accounts
This commit is contained in:
parent
950e99a1ab
commit
cc82e02d45
@ -37,7 +37,21 @@ int main(int argc, char **argv)
|
|||||||
rc = accountGetPreselectedUser(&userID);
|
rc = accountGetPreselectedUser(&userID);
|
||||||
|
|
||||||
if (R_FAILED(rc)) {
|
if (R_FAILED(rc)) {
|
||||||
printf("accountGetPreselectedUser() failed: 0x%x\n", rc);
|
printf("accountGetPreselectedUser() failed: 0x%x, using pselUi..\n", rc);
|
||||||
|
|
||||||
|
/* Create player selection UI settings */
|
||||||
|
PselUiSettings settings;
|
||||||
|
rc = pselUiCreate(&settings, PselUiMode_UserSelector);
|
||||||
|
|
||||||
|
if (R_FAILED(rc)) {
|
||||||
|
printf("pselUiCreate() failed: 0x%x\n", rc);
|
||||||
|
} else {
|
||||||
|
/* Ask for a user account */
|
||||||
|
rc = pselUiShow(&settings, &userID);
|
||||||
|
if (R_FAILED(rc)) {
|
||||||
|
printf("pselUiShow() failed: 0x%x\n", rc);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (R_SUCCEEDED(rc)) {
|
if (R_SUCCEEDED(rc)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user