nn_act: Fix account endianness (#141)

Also adds some code for enabling multi-user support inside apps maybe, but it's probably hardcoded in more places since Cemu currently only shows the active account.
This commit is contained in:
Crementif 2022-09-02 09:46:19 +02:00 committed by GitHub
parent a3b1af4e3d
commit 86e1a2227c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 16 additions and 9 deletions

View file

@ -138,11 +138,9 @@ void nnActExport_GetNumOfAccounts(PPCInterpreter_t* hCPU)
void nnActExport_IsSlotOccupied(PPCInterpreter_t* hCPU)
{
forceLogDebug_printf("nn_act.IsSlotOccupied(%d)\n", hCPU->gpr[3]);
sint32 slotIndex = (sint32)hCPU->gpr[3] - 1; // first slot is 1
bool isOccupied = false;
if( slotIndex == 0 )
isOccupied = true;
osLib_returnFromFunction(hCPU, isOccupied?1:0);
ppcDefineParamU8(slot, 0);
osLib_returnFromFunction(hCPU, nn::act::GetPersistentIdEx(slot) != 0 ? 1 : 0);
}
uint32 GetAccountIdEx(char* accountId, uint8 slot)