Moving hleDelayResult from internal function of SetSocketAlert to prevent waking up HLE-blocked thread

This commit is contained in:
ANR2ME 2021-02-05 21:46:16 +07:00
parent a7eccc0c6f
commit ddc122bcbe

View file

@ -1808,14 +1808,16 @@ int NetAdhoc_SetSocketAlert(int id, s32_le flag) {
adhocSockets[id - 1]->flags = flg;
adhocSockets[id - 1]->alerted_flags = 0;
return hleDelayResult(0, "set socket alert delay", 1000);
return 0;
}
// Flags seems to be bitmasks of ADHOC_F_ALERT... (need more games to test this)
int sceNetAdhocSetSocketAlert(int id, int flag) {
WARN_LOG_REPORT_ONCE(sceNetAdhocSetSocketAlert, SCENET, "UNTESTED sceNetAdhocSetSocketAlert(%d, %08x) at %08x", id, flag, currentMIPS->pc);
return hleLogDebug(SCENET, NetAdhoc_SetSocketAlert(id, flag), "");
int retval = NetAdhoc_SetSocketAlert(id, flag);
hleDelayResult(retval, "set socket alert delay", 1000);
return hleLogDebug(SCENET, retval, "");
}
int PollAdhocSocket(SceNetAdhocPollSd* sds, int count, int timeout, int nonblock) {