mirror of
https://github.com/switchbrew/switch-examples.git
synced 2025-06-20 21:12:38 +02:00
Updated examples to pass ServiceType to the relevant *Initialize() funcs, as required by latest libnx.
This commit is contained in:
parent
b9df83b93d
commit
25d9880c3b
@ -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);
|
||||
}
|
||||
|
@ -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();
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user