From 73e8b0cb7c3520b81022598c2901f38d3f0e928d Mon Sep 17 00:00:00 2001 From: Pavel <68122101+red-prig@users.noreply.github.com> Date: Wed, 8 Nov 2023 17:05:47 +0300 Subject: [PATCH] + --- src/ps4_libscehttp.pas | 1 + src/ps4_libscenet.pas | 26 +++++++++++++------------- 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/src/ps4_libscehttp.pas b/src/ps4_libscehttp.pas index d6f88e28..b4ab9a1f 100644 --- a/src/ps4_libscehttp.pas +++ b/src/ps4_libscehttp.pas @@ -22,6 +22,7 @@ implementation SCE_HTTP_ERROR_OUT_OF_MEMORY=$80431022; SCE_HTTP_ERROR_INVALID_VALUE=$804311fe; SCE_HTTP_ERROR_INVALID_URL =$80433060; + SCE_HTTP_ERROR_NETWORK =$80431063; type SceHttpUriElement=packed record diff --git a/src/ps4_libscenet.pas b/src/ps4_libscenet.pas index 98da251c..79c38d74 100644 --- a/src/ps4_libscenet.pas +++ b/src/ps4_libscenet.pas @@ -12,6 +12,14 @@ interface implementation +const + SCE_NET_EINVAL =22; + SCE_NET_ENOSPC =28; + SCE_NET_EAFNOSUPPORT=47; + + SCE_NET_EHOSTUNREACH=65; + + threadvar sce_net_errno:Integer; @@ -103,25 +111,25 @@ function ps4_sceNetTerm:Integer; SysV_ABI_CDecl; function ps4_sceNetPoolCreate(name:PChar;size,flags:Integer):Integer; SysV_ABI_CDecl; begin - Writeln('sceNetPoolCreate:',name,':',size,':',flags); + //Writeln('sceNetPoolCreate:',name,':',size,':',flags); Result:=2; // iNetLibId end; function ps4_sceNetPoolDestroy(memid:Integer):Integer; SysV_ABI_CDecl; begin - Writeln('sceNetPoolDestroy:',memid); + //Writeln('sceNetPoolDestroy:',memid); Result:=0; end; function ps4_sceNetResolverCreate(name:PChar;memid,flags:Integer):Integer; SysV_ABI_CDecl; begin - Writeln('sceNetResolverCreate:',name,':',memid); + //Writeln('sceNetResolverCreate:',name,':',memid); Result:=111; end; function ps4_sceNetEpollCreate(name:PChar;flags:Integer):Integer; SysV_ABI_CDecl; begin - Writeln('sceNetEpollCreate:',name,':',flags); +//Writeln('sceNetEpollCreate:',name,':',flags); Result:=3; end; @@ -129,10 +137,6 @@ function ps4_sceNetEpollCreate(name:PChar;flags:Integer):Integer; SysV_ABI_CDecl AF_INET = 2; AF_INET6=28; - SCE_NET_EINVAL =22; - SCE_NET_ENOSPC =28; - SCE_NET_EAFNOSUPPORT=47; - function ps4_sceNetInetPton(af:Integer; src:Pchar; dst:Pointer):Integer; SysV_ABI_CDecl; @@ -354,11 +358,7 @@ function ps4_sceNetGetsockopt(s:Integer; level:Integer; optname:Integer; optval: function ps4_sceNetResolverStartAton(rid:Integer; const addr:pSceNetInAddr; hostname:PChar; hostname_len:Integer; timeout:Integer; retry:Integer; flags:Integer):Integer; SysV_ABI_CDecl; begin - if (hostname<>nil) then - begin - FillChar(hostname^,hostname_len,0); - end; - Result:=0; + Exit(_set_net_errno(SCE_NET_EHOSTUNREACH)); end; function ps4_sceNetResolverDestroy(rid:Integer):Integer; SysV_ABI_CDecl;