sceCompositorGetCanvasHandle, sceApplicationSetCanvasHandle

This commit is contained in:
Pavel 2023-01-27 14:16:29 +03:00
parent ab46774872
commit 5eee3a20d3
3 changed files with 18 additions and 1 deletions

View File

@ -478,7 +478,7 @@ type
unk4:array[0.. 6] of Byte; //7
end;
//sysctl to KERN_PROC_ENV
//sysctl to CTL_KERN(1).KERN_PROC(14).KERN_PROC_APPINFO(35)
function ps4_sceKernelGetAppInfo(pid:Integer;env:PSCE_APP_ENV):Integer; SysV_ABI_CDecl;
begin
//ignore pid

View File

@ -134,6 +134,15 @@ begin
end;
end;
function ps4_sceCompositorGetCanvasHandle(canvasId:Byte;ret_handle:PDWORD):Integer; SysV_ABI_CDecl;
var
app_id:Word;
begin
app_id:=Word(GetProcessID);
ret_handle^:=app_id or (canvasId shl 16);
Result:=0;
end;
function Load_libSceComposite(Const name:RawByteString):TElf_node;
var
lib:PLIBRARY;
@ -156,6 +165,8 @@ begin
lib^.set_proc($1B843C28D91BE571,@ps4_sceCompositorAllocateIndex);
lib^.set_proc($670B01077B3CA8C9,@ps4_sceCompositorReleaseIndex);
lib^.set_proc($37B3EB33E94F316D,@ps4_sceCompositorGetCanvasHandle);
lib^.set_proc($7472BEAAEE43D873,@ps4_sceCompositorSetDebugPositionCommand);
end;

View File

@ -15,6 +15,11 @@ begin
Result:=0;
end;
function ps4_sceApplicationSetCanvasHandle(canvasId:Byte;handle:DWORD):Integer; SysV_ABI_CDecl;
begin
Result:=0;
end;
function Load_libSceSysCore(Const name:RawByteString):TElf_node;
var
lib:PLIBRARY;
@ -25,6 +30,7 @@ begin
lib:=Result._add_lib('libSceSysCore');
lib^.set_proc($5C5608B4EC52EABD,@ps4_sceApplicationInitialize);
lib^.set_proc($A931E269B7C4BA4C,@ps4_sceApplicationSetCanvasHandle);
end;
initialization