mirror of https://github.com/red-prig/fpPS4.git
This commit is contained in:
parent
49bd57509b
commit
ff32b6bc16
|
@ -1575,6 +1575,11 @@
|
|||
<IsPartOfProject Value="True"/>
|
||||
<UnitName Value="ps4_libSceRemoteplay"/>
|
||||
</Unit>
|
||||
<Unit>
|
||||
<Filename Value="src\np\ps4_libscenpsns.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<UnitName Value="ps4_libSceNpSns"/>
|
||||
</Unit>
|
||||
</Units>
|
||||
</ProjectOptions>
|
||||
<CompilerOptions>
|
||||
|
|
|
@ -83,6 +83,7 @@ uses
|
|||
ps4_libSceNpGameIntent,
|
||||
ps4_libSceNpWebApi,
|
||||
ps4_libSceNpWebApi2,
|
||||
ps4_libSceNpSns,
|
||||
ps4_libSceRemoteplay,
|
||||
ps4_libSceScreenShot,
|
||||
ps4_libSceSaveData,
|
||||
|
|
|
@ -10,6 +10,9 @@ uses
|
|||
|
||||
implementation
|
||||
|
||||
uses
|
||||
ps4_libSceUserService;
|
||||
|
||||
const
|
||||
SCE_NP_GAME_INTENT_TYPE_MAX_SIZE=(32+1);
|
||||
SCE_NP_GAME_INTENT_DATA_MAX_SIZE=(16*1024+1);
|
||||
|
@ -30,7 +33,7 @@ type
|
|||
pSceNpGameIntentInfo=^SceNpGameIntentInfo;
|
||||
SceNpGameIntentInfo=packed record
|
||||
size :QWORD;
|
||||
userId :Integer;
|
||||
userId :SceUserServiceUserId;
|
||||
intentType:array[0..SCE_NP_GAME_INTENT_TYPE_MAX_SIZE-1] of AnsiChar;
|
||||
padding :array[0..6] of Byte;
|
||||
reserved :array[0..255] of Byte;
|
||||
|
|
|
@ -0,0 +1,103 @@
|
|||
unit ps4_libSceNpSns;
|
||||
|
||||
{$mode ObjFPC}{$H+}
|
||||
{$CALLING SysV_ABI_CDecl}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
subr_dynlib;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
ps4_libSceUserService;
|
||||
|
||||
const
|
||||
SCE_NP_SNS_FACEBOOK_ERROR_UNKNOWN =-2141903359; // 0x80552601
|
||||
SCE_NP_SNS_FACEBOOK_ERROR_INVALID_ARGUMENT =-2141903358; // 0x80552602
|
||||
SCE_NP_SNS_FACEBOOK_ERROR_OUT_OF_MEMORY =-2141903357; // 0x80552603
|
||||
SCE_NP_SNS_FACEBOOK_ERROR_EXCEEDS_MAX =-2141903356; // 0x80552604
|
||||
SCE_NP_SNS_FACEBOOK_ERROR_UGM_RESTRICTION =-2141903355; // 0x80552605
|
||||
SCE_NP_SNS_FACEBOOK_ERROR_ABORTED =-2141903354; // 0x80552606
|
||||
SCE_NP_SNS_FACEBOOK_ERROR_ACCOUNT_NOT_BOUND =-2141903353; // 0x80552607
|
||||
SCE_NP_SNS_FACEBOOK_ERROR_CANCELED_BY_SYSTEM=-2141903352; // 0x80552608
|
||||
SCE_NP_SNS_FACEBOOK_ERROR_SUB_ACCOUNT =-2141903351; // 0x80552609
|
||||
|
||||
const
|
||||
SCE_NP_SNS_FACEBOOK_MAX_REQUEST_NUM =16;
|
||||
SCE_NP_SNS_FACEBOOK_PERMISSIONS_LENGTH_MAX =1023;
|
||||
SCE_NP_SNS_FACEBOOK_ACCESS_TOKEN_LENGTH_MAX=4096;
|
||||
|
||||
type
|
||||
pSceNpSnsFacebookAccessTokenParam=^SceNpSnsFacebookAccessTokenParam;
|
||||
SceNpSnsFacebookAccessTokenParam=packed record
|
||||
size :QWORD; //sizeof(SceNpSnsFacebookAccessTokenParam)
|
||||
userId :SceUserServiceUserId;
|
||||
_align :Integer;
|
||||
fbAppId :QWORD;
|
||||
permissions:array[0..SCE_NP_SNS_FACEBOOK_PERMISSIONS_LENGTH_MAX] of AnsiChar;
|
||||
reserved :array[0..31] of Byte;
|
||||
end;
|
||||
|
||||
pSceNpSnsFacebookAccessTokenResult=^SceNpSnsFacebookAccessTokenResult;
|
||||
SceNpSnsFacebookAccessTokenResult=packed record
|
||||
expiration :QWORD; //(sec)
|
||||
accessToken:array[0..SCE_NP_SNS_FACEBOOK_ACCESS_TOKEN_LENGTH_MAX] of AnsiChar;
|
||||
reserved :array[0..38] of Byte;
|
||||
end;
|
||||
|
||||
function ps4_sceNpSnsFacebookCreateRequest():Integer;
|
||||
begin
|
||||
Result:=1;
|
||||
end;
|
||||
|
||||
function ps4_sceNpSnsFacebookDeleteRequest(reqId:Integer):Integer;
|
||||
begin
|
||||
Result:=0;
|
||||
end;
|
||||
|
||||
function ps4_sceNpSnsFacebookAbortRequest(reqId:Integer):Integer;
|
||||
begin
|
||||
Result:=0;
|
||||
end;
|
||||
|
||||
function ps4_sceNpSnsFacebookGetAccessToken(
|
||||
reqId :Integer;
|
||||
param :pSceNpSnsFacebookAccessTokenParam;
|
||||
pres :pSceNpSnsFacebookAccessTokenResult
|
||||
):Integer;
|
||||
begin
|
||||
if (param=nil) or (pres=nil) then
|
||||
begin
|
||||
Exit(SCE_NP_SNS_FACEBOOK_ERROR_INVALID_ARGUMENT);
|
||||
end;
|
||||
|
||||
pres^:=Default(SceNpSnsFacebookAccessTokenResult);
|
||||
pres^.accessToken[0]:='0';
|
||||
|
||||
Result:=0;
|
||||
end;
|
||||
|
||||
function Load_libSceNpSns(name:pchar):p_lib_info;
|
||||
var
|
||||
lib:TLIBRARY;
|
||||
begin
|
||||
Result:=obj_new_int('libSceNpSns');
|
||||
|
||||
lib:=Result^.add_lib('libSceNpSns');
|
||||
|
||||
lib.set_proc($3A84E37F197CFF02,@ps4_sceNpSnsFacebookCreateRequest);
|
||||
lib.set_proc($A53BC0295D624241,@ps4_sceNpSnsFacebookDeleteRequest);
|
||||
lib.set_proc($FCB25B17D6FF5A1A,@ps4_sceNpSnsFacebookAbortRequest);
|
||||
lib.set_proc($56DC92F172C1A8D1,@ps4_sceNpSnsFacebookGetAccessToken);
|
||||
end;
|
||||
|
||||
var
|
||||
stub:t_int_file;
|
||||
|
||||
initialization
|
||||
RegisteredInternalFile(stub,'libSceNpSns.prx',@Load_libSceNpSns);
|
||||
|
||||
end.
|
||||
|
|
@ -6,7 +6,8 @@ unit ps4_libSceGameLiveStreaming;
|
|||
interface
|
||||
|
||||
uses
|
||||
subr_dynlib;
|
||||
subr_dynlib,
|
||||
ps4_libSceUserService;
|
||||
|
||||
const
|
||||
SCE_GAME_LIVE_STREAMING_MAX_SOCIAL_FEEDBACK_PRESET_TEXT_LENGTH=32;
|
||||
|
@ -49,13 +50,13 @@ type
|
|||
isOnAir :Boolean;
|
||||
_align :array[0..2] of Byte;
|
||||
spectatorCounts:DWORD;
|
||||
userId :Integer;
|
||||
userId :SceUserServiceUserId;
|
||||
reserved :array[0..59] of Byte;
|
||||
end;
|
||||
|
||||
pSceGameLiveStreamingStatus2=^SceGameLiveStreamingStatus2;
|
||||
SceGameLiveStreamingStatus2=packed record
|
||||
userId :Integer;
|
||||
userId :SceUserServiceUserId;
|
||||
isOnAir :Boolean;
|
||||
_align :array[0..2] of Byte;
|
||||
spectatorCounts :DWORD;
|
||||
|
|
|
@ -16,7 +16,8 @@ uses
|
|||
atomic,
|
||||
mpmc_queue,
|
||||
Classes,
|
||||
SysUtils;
|
||||
SysUtils,
|
||||
ps4_libSceUserService;
|
||||
|
||||
const
|
||||
SCE_IME_ERROR_BUSY =-2135162879; // 0x80BC0001
|
||||
|
@ -634,7 +635,7 @@ type
|
|||
|
||||
pSceImeKeyboardInfo=^SceImeKeyboardInfo;
|
||||
SceImeKeyboardInfo=packed record
|
||||
userId :Integer;
|
||||
userId :SceUserServiceUserId;
|
||||
device :Integer; //SceImeKeyboardDeviceType
|
||||
_type :Integer; //SceImeKeyboardType
|
||||
repeatDelay:DWORD;
|
||||
|
@ -645,7 +646,7 @@ type
|
|||
|
||||
pSceImeKeyboardResourceIdArray=^SceImeKeyboardResourceIdArray;
|
||||
SceImeKeyboardResourceIdArray=packed record
|
||||
userId :Integer;
|
||||
userId :SceUserServiceUserId;
|
||||
resourceId:array[0..SCE_IME_KEYBOARD_MAX_NUMBER-1] of DWORD;
|
||||
end;
|
||||
|
||||
|
@ -654,7 +655,7 @@ type
|
|||
character :WideChar;
|
||||
status :DWORD;
|
||||
_type :Integer; //SceImeKeyboardType
|
||||
userId :Integer;
|
||||
userId :SceUserServiceUserId;
|
||||
resourceId:DWORD;
|
||||
_align :Integer;
|
||||
timestamp :QWORD; //SceRtcTick
|
||||
|
@ -1134,7 +1135,7 @@ begin
|
|||
end;
|
||||
|
||||
function ps4_sceImeKeyboardOpen(
|
||||
userId:Integer;
|
||||
userId:SceUserServiceUserId;
|
||||
param:pSceImeKeyboardParam
|
||||
):Integer;
|
||||
begin
|
||||
|
@ -1207,7 +1208,7 @@ begin
|
|||
Result:=0;
|
||||
end;
|
||||
|
||||
function ps4_sceImeKeyboardGetResourceId(userId:Integer;resourceIdArray:pSceImeKeyboardResourceIdArray):Integer;
|
||||
function ps4_sceImeKeyboardGetResourceId(userId:SceUserServiceUserId;resourceIdArray:pSceImeKeyboardResourceIdArray):Integer;
|
||||
begin
|
||||
if (keyboard_init=0) then Exit(SCE_IME_ERROR_NOT_OPENED);
|
||||
if (resourceIdArray=nil) then Exit(SCE_IME_ERROR_INVALID_ADDRESS);
|
||||
|
|
|
@ -10,6 +10,9 @@ uses
|
|||
|
||||
implementation
|
||||
|
||||
uses
|
||||
ps4_libSceUserService;
|
||||
|
||||
const
|
||||
SCE_REMOTEPLAY_HEAP_SIZE=6*1024;
|
||||
|
||||
|
@ -33,7 +36,7 @@ const
|
|||
SCE_REMOTEPLAY_CONNECTION_STATUS_DISCONNECT=0;
|
||||
SCE_REMOTEPLAY_CONNECTION_STATUS_CONNECT =1;
|
||||
|
||||
function ps4_sceRemoteplayGetConnectionStatus(userId:Integer;pStatus:PInteger):Integer;
|
||||
function ps4_sceRemoteplayGetConnectionStatus(userId:SceUserServiceUserId;pStatus:PInteger):Integer;
|
||||
begin
|
||||
if (pStatus<>nil) then
|
||||
begin
|
||||
|
|
Loading…
Reference in New Issue