mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-02-06 09:39:55 +00:00
Fix sceNpUtilCmpNpId
This commit is contained in:
parent
8214425a3c
commit
5692c3de04
@ -4596,24 +4596,24 @@ error_code sceNpUtilCmpNpId(vm::ptr<SceNpId> id1, vm::ptr<SceNpId> id2)
|
||||
}
|
||||
|
||||
// Unknown what this constant means
|
||||
// if (id1->reserved[0] != 1 || id2->reserved[0] != 1)
|
||||
// {
|
||||
// return SCE_NP_UTIL_ERROR_INVALID_NP_ID;
|
||||
// }
|
||||
if (id1->reserved[0] != 1 || id2->reserved[0] != 1)
|
||||
{
|
||||
return SCE_NP_UTIL_ERROR_INVALID_NP_ID;
|
||||
}
|
||||
|
||||
if (strcmp(id1->handle.data, id2->handle.data))// || id1->unk1[0] != id2->unk1[0])
|
||||
if (strncmp(id1->handle.data, id2->handle.data, 16) || id1->unk1[0] != id2->unk1[0])
|
||||
{
|
||||
return SCE_NP_UTIL_ERROR_NOT_MATCH;
|
||||
}
|
||||
|
||||
// if (id1->unk1[1] != id2->unk1[1])
|
||||
// {
|
||||
// // If either is zero they match
|
||||
// if (id1->opt[4] && id2->opt[4])
|
||||
// {
|
||||
// return SCE_NP_UTIL_ERROR_NOT_MATCH;
|
||||
// }
|
||||
// }
|
||||
if (id1->unk1[1] != id2->unk1[1])
|
||||
{
|
||||
// If either is zero they match
|
||||
if (id1->opt[4] && id2->opt[4])
|
||||
{
|
||||
return SCE_NP_UTIL_ERROR_NOT_MATCH;
|
||||
}
|
||||
}
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
@ -137,6 +137,7 @@ void np_handler::init_NP(u32 poolsize, vm::ptr<void> poolptr)
|
||||
ASSERT(s_npid != ""); // It should be generated in settings window if empty
|
||||
|
||||
strcpy_trunc(npid.handle.data, s_npid);
|
||||
npid.reserved[0] = 1;
|
||||
}
|
||||
|
||||
switch (g_cfg.net.psn_status)
|
||||
|
Loading…
x
Reference in New Issue
Block a user