mirror of https://github.com/cemu-project/Cemu.git
nn_act: Handle incorrect slot 0 for PersistentId
This commit is contained in:
parent
651e5336b4
commit
67819a68d9
|
@ -622,12 +622,21 @@ int iosuAct_thread()
|
|||
actCemuRequest->setACTReturnCode(0);
|
||||
}
|
||||
else if (actCemuRequest->requestCode == IOSU_ARC_PERSISTENTID)
|
||||
{
|
||||
if(actCemuRequest->accountSlot != 0)
|
||||
{
|
||||
accountIndex = iosuAct_getAccountIndexBySlot(actCemuRequest->accountSlot);
|
||||
_cancelIfAccountDoesNotExist();
|
||||
actCemuRequest->resultU32.u32 = _actAccountData[accountIndex].persistentId;
|
||||
actCemuRequest->setACTReturnCode(0);
|
||||
}
|
||||
else
|
||||
{
|
||||
// F1 Race Stars calls IsSlotOccupied and indirectly GetPersistentId on slot 0 which is not valid
|
||||
actCemuRequest->resultU32.u32 = 0;
|
||||
actCemuRequest->setACTReturnCode(0);
|
||||
}
|
||||
}
|
||||
else if (actCemuRequest->requestCode == IOSU_ARC_COUNTRY)
|
||||
{
|
||||
accountIndex = iosuAct_getAccountIndexBySlot(actCemuRequest->accountSlot);
|
||||
|
|
Loading…
Reference in New Issue