Entwickler-Ecke

Multimedia / Grafik - Joystick mit MMSystem: Schubregler, Ruder...?


Andreas Pfau - Mo 15.09.03 19:16
Titel: Joystick mit MMSystem: Schubregler, Ruder...?
Hallo,

ich will eine Joystick-Unterstützung für ein spiel scheriben. Ich habe ein Gamepad (4 Achsen, POV, 12 Buttons). Nun frage ich es ab mit JoyGetPosEx(), wozu ich diesen Record brauche:

Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
  joyinfoex_tag = record
    dwSize: DWORD;     { size of structure }
    dwFlags: DWORD;     { flags to indicate what to return }
    wXpos: UINT;         { x position }
    wYpos: UINT;         { y position }
    wZpos: UINT;         { z position }
    dwRpos: DWORD;     { rudder/4th axis position }
    dwUpos: DWORD;     { 5th axis position }
    dwVpos: DWORD;     { 6th axis position }
    wButtons: UINT;      { button states }
    dwButtonNumber: DWORD;  { current button number pressed }
    dwPOV: DWORD;           { point of view state }
    dwReserved1: DWORD;     { reserved for communication between winmm & driver }
    dwReserved2: DWORD;     { reserved for future expansion }
  end;

So, welche Variable gehört zu welcher Achse? X und Y ist klar, und dwRPos ist das Ruder, aber was geben wZPos, dwUPos und dwVPos an? Da muss doch eine Variable für die Schubkontrolle sein? Weiß das jemand, oder könnte das jemand von euch ausprobieren, welche Variable für die Schubkontrolle ist? Und, was ich auch nicht weiß: Wenn das Ruder auf 0 ist, ist das dann links oder rechts? Und wenn Schub auf 0 ist, ist das dann auch tatsächlich 0 Schub, oder sit das invertiert?