Für den linken Stick funktioniert folgender Code:
Code: Alles auswählen
uses mmsystem;
[...]
var
Joyinfo: TJoyinfo;
[...]
joygetpos(joystickid1,@Joyinfo);
Ausgabe:=FormatFloat('0', Joyinfo.wXpos);
Ausgabe:=FormatFloat('0', Joyinfo.wYpos);
WXpos und wYPos sind vom typ uint. Um die Eingabe des rechten Sticks zu nutzen, habe ich es mit TJoyinfoEx probiert:
Code: Alles auswählen
uses mmsystem;
[...]
var
JoyinfoEx: TJoyinfoEx;
[...]
joygetposEx(joystickid1,@JoyinfoEx);
Ausgabe:=FormatFloat('0', JoyinfoEx.dwRpos);
Ausgabe:=FormatFloat('0', JoyinfoEx.dwUpos);
Ausgabe:=FormatFloat('0', JoyinfoEx.dwVpos);
Wie komme ich an die Daten des rechten Sticks heran?