-
Notifications
You must be signed in to change notification settings - Fork 137
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
81f5607
commit 6b911ba
Showing
2 changed files
with
83 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
unit ps4_libSceMoveTracker; | ||
|
||
{$mode ObjFPC}{$H+} | ||
|
||
interface | ||
|
||
uses | ||
ps4_program; | ||
|
||
implementation | ||
|
||
const | ||
SCE_MOVE_TRACKER_ERROR_INVALID_ARG=-2131820541; //0x80EF0003; | ||
|
||
SCE_MOVE_MAX_CONTROLLERS=4; | ||
SCE_MOVE_MAX_CONTROLLERS_PER_PLAYER=2; | ||
|
||
type | ||
pSceMoveButtonData=^SceMoveButtonData; | ||
SceMoveButtonData=packed record | ||
digitalButtons,analogT:Word; | ||
end; | ||
|
||
pSceMoveExtensionPortData=^SceMoveExtensionPortData; | ||
SceMoveExtensionPortData=packed record | ||
end; | ||
|
||
pSceMoveData=^SceMoveData; | ||
SceMoveData=packed record | ||
accelerometer:single; | ||
gyro:single; | ||
pad:SceMoveButtonData; | ||
ext:SceMoveExtensionPortData; | ||
timestamp:Integer; | ||
counter:Integer; | ||
temperature:single; | ||
end; | ||
|
||
pSceMoveTrackerControllerInput=^SceMoveTrackerControllerInput; | ||
SceMoveTrackerControllerInput=packed record | ||
handle:Integer; | ||
data:pSceMoveData; | ||
num:Integer; | ||
end; | ||
|
||
function ps4_sceMoveTrackerGetWorkingMemorySize(onionSize,garlicSize:PInteger):Integer; SysV_ABI_CDecl; | ||
begin | ||
if (onionSize=nil) or (garlicSize=nil) then Exit(SCE_MOVE_TRACKER_ERROR_INVALID_ARG); | ||
onionSize^:=0; | ||
garlicSize^:=0; | ||
Result:=0; | ||
end; | ||
|
||
function ps4_sceMoveTrackerInit(onionMemory,garlicMemory:Pointer;pipeId,queueId:Integer):Integer; SysV_ABI_CDecl; | ||
begin | ||
if (onionMemory=nil) or (garlicMemory=nil) then Exit(SCE_MOVE_TRACKER_ERROR_INVALID_ARG); | ||
Result:=0; | ||
end; | ||
|
||
function ps4_sceMoveTrackerControllersUpdate(controllerInputs:SceMoveTrackerControllerInput):Integer; SysV_ABI_CDecl; | ||
begin | ||
Result:=0; | ||
end; | ||
|
||
function Load_libSceMoveTracker(Const name:RawByteString):TElf_node; | ||
var | ||
lib:PLIBRARY; | ||
begin | ||
Result:=TElf_node.Create; | ||
Result.pFileName:=name; | ||
|
||
lib:=Result._add_lib('libSceMoveTracker'); | ||
lib^.set_proc($820D5DE0AB32555B,@ps4_sceMoveTrackerGetWorkingMemorySize); | ||
lib^.set_proc($178C366ADC06E36F,@ps4_sceMoveTrackerInit); | ||
lib^.set_proc($FD8F2194C801B2BE,@ps4_sceMoveTrackerControllersUpdate); | ||
end; | ||
|
||
initialization | ||
ps4_app.RegistredPreLoad('libSceMoveTracker.prx',@Load_libSceMoveTracker); | ||
|
||
end. | ||
|