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

@ -48,7 +48,7 @@ typedef struct
char country[8];
// Mii
FFLData_t miiData;
uint16be miiNickname[ACT_NICKNAME_LENGTH];
uint16le miiNickname[ACT_NICKNAME_LENGTH];
}actAccountData_t;
#define IOSU_ACT_ACCOUNT_MAX_COUNT (0xC)
@ -103,6 +103,15 @@ void iosuAct_loadAccounts()
const auto& first_acc = Account::GetAccount(persistent_id);
FillAccountData(first_acc, online_enabled, counter);
++counter;
// enable multiple accounts for cafe functions (badly tested)
//for (const auto& account : Account::GetAccounts())
//{
// if (first_acc.GetPersistentId() != account.GetPersistentId())
// {
// FillAccountData(account, online_enabled, counter);
// ++counter;
// }
//}
cemuLog_force(L"IOSU_ACT: using account {} in first slot", first_acc.GetMiiName());