mirror of https://github.com/red-prig/fpPS4.git
SceHmd & SceNet Implementations (#154)
* sceHmdReprojectionSetDisplayBuffers * sceHmdOpen * sceHmdGetFieldOfView * sceHmdOpen fixes * Fixes * sceNetHtonll * sceNetResolverStartNtoa * Fixes * Fixes * fixes --------- Co-authored-by: red-prig <vdpasha@mail.ru>
This commit is contained in:
parent
c46781caaf
commit
905a9a6de4
|
@ -10,6 +10,23 @@ uses
|
|||
Classes,
|
||||
SysUtils;
|
||||
|
||||
const
|
||||
SCE_HMD_ERROR_PARAMETER_NULL=Integer($81110008);
|
||||
|
||||
type
|
||||
pSceHmdOpenParam=^SceHmdOpenParam;
|
||||
SceHmdOpenParam=packed record
|
||||
reserve:array[0..7] of Byte;
|
||||
end;
|
||||
|
||||
pSceHmdFieldOfView=^SceHmdFieldOfView;
|
||||
SceHmdFieldOfView=packed record
|
||||
tanOut :Single;
|
||||
tanIn :Single;
|
||||
tanTop :Single;
|
||||
tanBottom:Single;
|
||||
end;
|
||||
|
||||
implementation
|
||||
|
||||
function ps4_sceHmdInitialize(param:Pointer):Integer; SysV_ABI_CDecl;
|
||||
|
@ -77,6 +94,28 @@ begin
|
|||
Result:=0;
|
||||
end;
|
||||
|
||||
function ps4_sceHmdReprojectionSetDisplayBuffers(videoOutHandle,index0,index1:Integer;option:Pointer):Integer; SysV_ABI_CDecl;
|
||||
begin
|
||||
Result:=0;
|
||||
end;
|
||||
|
||||
function ps4_sceHmdOpen(userId,_type,index:Integer;pParam:pSceHmdOpenParam):Integer; SysV_ABI_CDecl;
|
||||
begin
|
||||
Result:=0;
|
||||
end;
|
||||
|
||||
function ps4_sceHmdGetFieldOfView(handle:Integer;fieldOfView:pSceHmdFieldOfView):Integer; SysV_ABI_CDecl;
|
||||
begin
|
||||
if (fieldOfView=nil) then Exit(SCE_HMD_ERROR_PARAMETER_NULL);
|
||||
|
||||
fieldOfView^.tanOut :=1.20743;
|
||||
fieldOfView^.tanIn :=1.181346;
|
||||
fieldOfView^.tanTop :=1.262872;
|
||||
fieldOfView^.tanBottom:=1.262872;
|
||||
|
||||
Result:=0;
|
||||
end;
|
||||
|
||||
function ps4_sceHmdTerminate():Integer; SysV_ABI_CDecl;
|
||||
begin
|
||||
Result:=0;
|
||||
|
@ -102,6 +141,9 @@ begin
|
|||
lib^.set_proc($88634DA430E3730A,@ps4_sceHmdReprojectionUnsetDisplayBuffers);
|
||||
lib^.set_proc($66B579608A83D3D2,@ps4_sceHmdReprojectionFinalize);
|
||||
lib^.set_proc($99DC856DA263EBA3,@ps4_sceHmdReprojectionClearUserEventStart);
|
||||
lib^.set_proc($13E74F7E37902C72,@ps4_sceHmdReprojectionSetDisplayBuffers);
|
||||
lib^.set_proc($776839223EC4533A,@ps4_sceHmdOpen);
|
||||
lib^.set_proc($34F430605AA2D1BB,@ps4_sceHmdGetFieldOfView);
|
||||
lib^.set_proc($CFF44C20BA8FEAD1,@ps4_sceHmdTerminate);
|
||||
end;
|
||||
|
||||
|
|
|
@ -380,6 +380,16 @@ begin
|
|||
Result:=NToHs(net16);
|
||||
end;
|
||||
|
||||
function htonll(Value:QWORD):QWORD; inline;
|
||||
begin
|
||||
Result:=htonl(Value shr 32) or (htonl(Value) shl 32)
|
||||
end;
|
||||
|
||||
function ps4_sceNetHtonll(host64:QWORD):QWORD; SysV_ABI_CDecl;
|
||||
begin
|
||||
Result:=htonl(host64);
|
||||
end;
|
||||
|
||||
function ps4_sceNetEpollControl(eid:Integer; op:Integer; id:Integer; event:pSceNetEpollEvent):Integer; SysV_ABI_CDecl;
|
||||
begin
|
||||
Result:=0;
|
||||
|
@ -413,6 +423,18 @@ begin
|
|||
Move(chost^,hostname^,Length(chost));
|
||||
end;
|
||||
|
||||
function ps4_sceNetResolverStartNtoa(rid:Integer; const hostname:PChar; addr:pSceNetInAddr; timeout:Integer; retry:Integer; flags:Integer):Integer; SysV_ABI_CDecl;
|
||||
begin
|
||||
Result:=0;
|
||||
|
||||
ps4_usleep(100);
|
||||
|
||||
if (addr<>nil) then
|
||||
begin
|
||||
addr^.s_addr:=SceNetInAddr_t(Pointer(@default_addr.sa_data)^);
|
||||
end;
|
||||
end;
|
||||
|
||||
function ps4_sceNetResolverDestroy(rid:Integer):Integer; SysV_ABI_CDecl;
|
||||
begin
|
||||
Result:=0;
|
||||
|
@ -710,9 +732,11 @@ begin
|
|||
lib^.set_proc($868380A1F86146F1,@ps4_sceNetGetsockname);
|
||||
lib^.set_proc($A501A91D8A290086,@ps4_sceNetNtohl);
|
||||
lib^.set_proc($45BBEDFB9636884C,@ps4_sceNetNtohs);
|
||||
lib^.set_proc($DC21E2D4AD70B024,@ps4_sceNetHtonll);
|
||||
lib^.set_proc($655C38E9BB1AB009,@ps4_sceNetEpollControl);
|
||||
lib^.set_proc($C6986B66EB25EFC1,@ps4_sceNetGetsockopt);
|
||||
lib^.set_proc($0296F8603C4AB112,@ps4_sceNetResolverStartAton);
|
||||
lib^.set_proc($35DF7559A5A61B6C,@ps4_sceNetResolverStartNtoa);
|
||||
lib^.set_proc($9099581F9B8C0162,@ps4_sceNetResolverDestroy);
|
||||
lib^.set_proc($3975D7E26524DEE9,@ps4_sceNetConnect);
|
||||
lib^.set_proc($76B8C86C36C0ED44,@ps4_sceNetEpollWait);
|
||||
|
|
Loading…
Reference in New Issue