sceNpBasicGetEvent error checks improved

This commit is contained in:
Eladash 2019-09-29 02:14:29 +03:00 committed by Ani
parent d9a97d8674
commit fa73175754

View File

@ -1417,6 +1417,16 @@ error_code sceNpBasicGetEvent(vm::ptr<s32> event, vm::ptr<SceNpUserInfo> from, v
{ {
sceNp.todo("sceNpBasicGetEvent(event=*0x%x, from=*0x%x, data=*0x%x, size=*0x%x)", event, from, data, size); sceNp.todo("sceNpBasicGetEvent(event=*0x%x, from=*0x%x, data=*0x%x, size=*0x%x)", event, from, data, size);
if (!g_fxo->get<sce_np_manager>()->is_initialized)
{
return SCE_NP_BASIC_ERROR_NOT_INITIALIZED;
}
if (!event || !from || !data || !size)
{
return SCE_NP_BASIC_ERROR_INVALID_ARGUMENT;
}
// TODO: Check for other error and pass other events // TODO: Check for other error and pass other events
//*event = SCE_NP_BASIC_EVENT_OFFLINE; // This event only indicates a contact is offline, not the current status of the connection //*event = SCE_NP_BASIC_EVENT_OFFLINE; // This event only indicates a contact is offline, not the current status of the connection