Updated examples to pass ServiceType to the relevant *Initialize() funcs, as required by latest libnx.

This commit is contained in:
yellows8 2019-11-18 10:56:41 -05:00
parent b9df83b93d
commit 25d9880c3b
No known key found for this signature in database
GPG Key ID: 0AF90DA3F1E60E43
4 changed files with 5 additions and 5 deletions

View File

@ -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);
}

View File

@ -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();

View File

@ -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);
}

View File

@ -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);