Skip to content

Commit

Permalink
SceNpGetAccountLanguageA (#152)
Browse files Browse the repository at this point in the history
* Update ps4_libscenpmanager.pas (sceNpGetAccountLanguageA)

implement function

* Update ps4_libscenpmanager.pas

* Update ps4_libscenpmanager.pas (SceNpGetAccountLanguageA)

SceNpGetAccountLanguageA
  • Loading branch information
kr1spy2115 authored Dec 25, 2023
1 parent 08a56cf commit 7a1d63b
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions src/np/ps4_libscenpmanager.pas
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ interface

Const
SCE_NP_COUNTRY_CODE_LENGTH=2;

SCE_NP_LANGUAGE_CODE_MAX_LEN=5;

SCE_NP_TITLE_ID_LEN=12;

Expand Down Expand Up @@ -40,6 +42,12 @@ interface
padding:array[0..1] of AnsiChar;
end;

pSceNpLanguageCode=^SceNpLanguageCode;
SceNpLanguageCode=packed record
code:array[0..SCE_NP_LANGUAGE_CODE_MAX_LEN] of AnsiChar;
padding:array[0..9] of Byte;
end;

SceNpAgeRestriction=packed record
countryCode:SceNpCountryCode;
age:Shortint;
Expand Down Expand Up @@ -161,6 +169,13 @@ function ps4_sceNpGetAccountIdA(userId:Integer;pAccountId:PQWORD):Integer; SysV_
Result:=0;
end;

function ps4_sceNpGetAccountLanguageA(reqId,userId:Integer;pLangCode:pSceNpLanguageCode):Integer; SysV_ABI_CDecl;
begin
if (pLangCode=nil) then Exit(SCE_NP_ERROR_INVALID_ARGUMENT);
pLangCode^.code:='en';
Result:=0;
end;

const
GEOCLASS_NATION = 16;

Expand Down Expand Up @@ -533,6 +548,8 @@ function Load_libSceNpManager(Const name:RawByteString):TElf_node;
lib^.set_proc($BAA70F24B58BD3C3,@ps4_sceNpPollAsync);
lib^.set_proc($337C055DB610B400,@ps4_sceNpUnregisterStateCallbackA);
lib^.set_proc($F150537917F56702,@ps4_sceNpGetAccountDateOfBirth);
lib^.set_proc($4CF31B808C6FA20D,@ps4_sceNpGetAccountLanguageA);


lib:=Result._add_lib('libSceNpManagerForToolkit');
lib^.set_proc($D1CEC76D744A52DE,@ps4_sceNpRegisterStateCallbackForToolkit);
Expand Down

0 comments on commit 7a1d63b

Please sign in to comment.