Skip to content

Commit

Permalink
Updated examples to pass ServiceType to the relevant *Initialize() fu…
Browse files Browse the repository at this point in the history
…ncs, as required by latest libnx.
  • Loading branch information
yellows8 committed Nov 18, 2019
1 parent b9df83b commit 25d9880
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion account/source/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ int main(int argc, char **argv)
memset(&userdata, 0, sizeof(userdata));
memset(&profilebase, 0, sizeof(profilebase));

rc = accountInitialize();
rc = accountInitialize(AccountServiceType_Application);
if (R_FAILED(rc)) {
printf("accountInitialize() failed: 0x%x\n", rc);
}
Expand Down
2 changes: 1 addition & 1 deletion applet/app-playstats/source/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ int main(int argc, char* argv[])

// Only needed when using the cmds which require the Uid.
AccountUid preselected_uid={0};
rc = accountInitialize();
rc = accountInitialize(AccountServiceType_Application);
if (R_SUCCEEDED(rc)) {
rc = accountGetPreselectedUser(&preselected_uid);
accountExit();
Expand Down
2 changes: 1 addition & 1 deletion fs/save/source/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ int main(int argc, char **argv)
//See the account example for getting account info for an userID.
//See also the app_controldata example for getting info for an application_id.
if (R_FAILED(get_save(&application_id, &uid))) {
rc = accountInitialize();
rc = accountInitialize(AccountServiceType_Application);
if (R_FAILED(rc)) {
printf("accountInitialize() failed: 0x%x\n", rc);
}
Expand Down
4 changes: 2 additions & 2 deletions nfc/source/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -187,11 +187,11 @@ int main(int argc, char* argv[])
consoleUpdate(NULL);

// Initialize the nfp:* service.
rc = nfpInitialize();
rc = nfpInitialize(NfpServiceType_User);

// Check if NFC is enabled. If not, wait until it is.
// Note that various official games don't use nfc*().
if (R_SUCCEEDED(rc)) rc = nfcInitialize();
if (R_SUCCEEDED(rc)) rc = nfcInitialize(NfcServiceType_User);
if (R_SUCCEEDED(rc)) {
bool nfc_enabled = false;
rc = nfcIsNfcEnabled(&nfc_enabled);
Expand Down

0 comments on commit 25d9880

Please sign in to comment.