mirror of
https://github.com/cemu-project/Cemu.git
synced 2026-07-10 01:24:41 -06:00
Convert to more modern export and Implement non Ex variant.
This commit is contained in:
parent
6aba0724b0
commit
f768ea1311
@ -111,7 +111,7 @@ namespace act
|
|||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32 AcquireIndependentServiceToken(independentServiceToken_t* token, const char* clientId, uint32 cacheDurationInSeconds)
|
uint32 AcquireIndependentServiceToken(independentServiceToken_t* token, const char* clientId, uint32 cacheDurationInSeconds)
|
||||||
{
|
{
|
||||||
memset(token, 0, sizeof(independentServiceToken_t));
|
memset(token, 0, sizeof(independentServiceToken_t));
|
||||||
@ -144,6 +144,21 @@ namespace act
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
uint32 IsPasswordCacheEnabledEx(uint8 slot)
|
||||||
|
{
|
||||||
|
// this is currently a hack. It always returns true if just one other account has password cache enabled, regardless of slot.
|
||||||
|
// In the future we should implement this properly and read the value from the individual account via IOSU
|
||||||
|
const uint32 persistentId = GetPersistentIdEx(slot);
|
||||||
|
if (persistentId == 0)
|
||||||
|
return 0;
|
||||||
|
return Account::GetAccount(persistentId).IsPasswordCacheEnabled() ? 1 : 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
uint32 IsPasswordCacheEnabled()
|
||||||
|
{
|
||||||
|
return IsPasswordCacheEnabledEx(ACT_SLOT_CURRENT);
|
||||||
|
}
|
||||||
|
|
||||||
nnResult GetTimeZoneId(CafeString<65>* outTimezoneId)
|
nnResult GetTimeZoneId(CafeString<65>* outTimezoneId)
|
||||||
{
|
{
|
||||||
// return a placeholder timezone id for now
|
// return a placeholder timezone id for now
|
||||||
@ -269,22 +284,6 @@ void nnActExport_IsNetworkAccountEx(PPCInterpreter_t* hCPU)
|
|||||||
osLib_returnFromFunction(hCPU, isNetAcc);
|
osLib_returnFromFunction(hCPU, isNetAcc);
|
||||||
}
|
}
|
||||||
|
|
||||||
void nnActExport_IsPasswordCacheEnabledEx(PPCInterpreter_t* hCPU)
|
|
||||||
{
|
|
||||||
ppcDefineParamU8(slot, 0);
|
|
||||||
cemuLog_logDebug(LogType::Force, "nn_act.IsPasswordCacheEnabledEx({})", slot);
|
|
||||||
|
|
||||||
const uint32 persistentId = nn::act::GetPersistentIdEx(slot);
|
|
||||||
if (persistentId == 0)
|
|
||||||
{
|
|
||||||
osLib_returnFromFunction(hCPU, 0);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
const Account& account = Account::GetAccount(persistentId);
|
|
||||||
osLib_returnFromFunction(hCPU, account.IsPasswordCacheEnabled() ? 1 : 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
void nnActExport_GetSimpleAddressId(PPCInterpreter_t* hCPU)
|
void nnActExport_GetSimpleAddressId(PPCInterpreter_t* hCPU)
|
||||||
{
|
{
|
||||||
cemuLog_logDebug(LogType::Force, "nn_act.GetSimpleAddressId()");
|
cemuLog_logDebug(LogType::Force, "nn_act.GetSimpleAddressId()");
|
||||||
@ -784,7 +783,6 @@ namespace nn::act
|
|||||||
osLib_addFunction("nn_act", "GetSlotNoEx__Q2_2nn3actFRC7ACTUuid", nnActExport_GetSlotNoEx);
|
osLib_addFunction("nn_act", "GetSlotNoEx__Q2_2nn3actFRC7ACTUuid", nnActExport_GetSlotNoEx);
|
||||||
osLib_addFunction("nn_act", "IsNetworkAccount__Q2_2nn3actFv", nnActExport_IsNetworkAccount);
|
osLib_addFunction("nn_act", "IsNetworkAccount__Q2_2nn3actFv", nnActExport_IsNetworkAccount);
|
||||||
osLib_addFunction("nn_act", "IsNetworkAccountEx__Q2_2nn3actFUc", nnActExport_IsNetworkAccountEx);
|
osLib_addFunction("nn_act", "IsNetworkAccountEx__Q2_2nn3actFUc", nnActExport_IsNetworkAccountEx);
|
||||||
osLib_addFunction("nn_act", "IsPasswordCacheEnabledEx__Q2_2nn3actFUc", nnActExport_IsPasswordCacheEnabledEx);
|
|
||||||
// account id
|
// account id
|
||||||
osLib_addFunction("nn_act", "GetAccountId__Q2_2nn3actFPc", nnActExport_GetAccountId);
|
osLib_addFunction("nn_act", "GetAccountId__Q2_2nn3actFPc", nnActExport_GetAccountId);
|
||||||
osLib_addFunction("nn_act", "GetAccountIdEx__Q2_2nn3actFPcUc", nnActExport_GetAccountIdEx);
|
osLib_addFunction("nn_act", "GetAccountIdEx__Q2_2nn3actFPcUc", nnActExport_GetAccountIdEx);
|
||||||
@ -834,6 +832,8 @@ namespace nn::act
|
|||||||
osLib_addFunction("nn_act", "AcquirePrincipalIdByAccountId__Q2_2nn3actFPUiPA17_CcUi", nnActExport_AcquirePrincipalIdByAccountId);
|
osLib_addFunction("nn_act", "AcquirePrincipalIdByAccountId__Q2_2nn3actFPUiPA17_CcUi", nnActExport_AcquirePrincipalIdByAccountId);
|
||||||
|
|
||||||
cafeExportRegisterFunc(nn::act::GetErrorCode, "nn_act", "GetErrorCode__Q2_2nn3actFRCQ2_2nn6Result", LogType::Placeholder);
|
cafeExportRegisterFunc(nn::act::GetErrorCode, "nn_act", "GetErrorCode__Q2_2nn3actFRCQ2_2nn6Result", LogType::Placeholder);
|
||||||
|
cafeExportRegisterFunc(nn::act::IsPasswordCacheEnabled, "nn_act", "IsPasswordCacheEnabled__Q2_2nn3actFv", LogType::Placeholder);
|
||||||
|
cafeExportRegisterFunc(nn::act::IsPasswordCacheEnabledEx, "nn_act", "IsPasswordCacheEnabledEx__Q2_2nn3actFUc", LogType::Placeholder);
|
||||||
|
|
||||||
// placeholders / incomplete implementations
|
// placeholders / incomplete implementations
|
||||||
osLib_addFunction("nn_act", "HasNfsAccount__Q2_2nn3actFv", nnActExport_HasNfsAccount);
|
osLib_addFunction("nn_act", "HasNfsAccount__Q2_2nn3actFv", nnActExport_HasNfsAccount);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user