nn_act: Implement GetPersistentId{Ex}

This commit is contained in:
James Benton
2016-02-16 14:58:16 +00:00
parent 127f593fc4
commit 3094de9723
2 changed files with 24 additions and 0 deletions

View File

@@ -118,6 +118,22 @@ GetParentalControlSlotNoEx(uint8_t *parentSlot, uint8_t slot)
return nn::Result::Success;
}
uint32_t
GetPersistentId()
{
return GetPersistentIdEx(gCurrentSlot);
}
uint32_t
GetPersistentIdEx(uint8_t slot)
{
if (slot == gCurrentSlot) {
return 1;
} else {
return 0;
}
}
uint32_t
GetPrincipalId()
{
@@ -225,6 +241,8 @@ Module::registerCoreFunctions()
RegisterKernelFunctionName("GetAccountIdEx__Q2_2nn3actFPcUc", nn::act::GetAccountIdEx);
RegisterKernelFunctionName("GetParentalControlSlotNo__Q2_2nn3actFv", nn::act::GetParentalControlSlotNo);
RegisterKernelFunctionName("GetParentalControlSlotNoEx__Q2_2nn3actFPUcUc", nn::act::GetParentalControlSlotNoEx);
RegisterKernelFunctionName("GetPersistentId__Q2_2nn3actFv", nn::act::GetPersistentId);
RegisterKernelFunctionName("GetPersistentIdEx__Q2_2nn3actFv", nn::act::GetPersistentIdEx);
RegisterKernelFunctionName("GetPrincipalId__Q2_2nn3actFv", nn::act::GetPrincipalId);
RegisterKernelFunctionName("GetPrincipalIdEx__Q2_2nn3actFPUiUc", nn::act::GetPrincipalIdEx);
RegisterKernelFunctionName("GetSimpleAddressId__Q2_2nn3actFv", nn::act::GetSimpleAddressId);

View File

@@ -62,6 +62,12 @@ GetParentalControlSlotNo();
nn::Result
GetParentalControlSlotNoEx(uint8_t *parentSlot, uint8_t slot);
uint32_t
GetPersistentId();
uint32_t
GetPersistentIdEx(uint8_t slot);
uint32_t
GetPrincipalId();