Autor Beitrag
Tar-Minyatur
Hält's aus hier
Beiträge: 10



BeitragVerfasst: Sa 12.04.03 12:45 
Ich habe wie hier
http://www.delphi-forum.de/viewtopic.php?t=105&highlight=joystick
beschrieben versucht mein Joystick anzusprechen. Das Funktioniert unter winXP aber nicht, wie mach ich das das es auch unter WinXP funktioniert.
Andreas Pfau
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 997



BeitragVerfasst: Sa 19.04.03 10:24 
Ich mache das nicht mit automatischem polling. Ich weiß nur, wenn du den Joystick manuell abfragst (JoyGetPos() oder JoyGetPosEx()) funzt's unter jedem OS (ab 95). Weißt du, wie man diese Methoden verwendet?

_________________
Life is a bad adventure, but the graphic is really good!
Tar-Minyatur Threadstarter
Hält's aus hier
Beiträge: 10



BeitragVerfasst: Sa 19.04.03 14:08 
Titel: @ Andreas Pfau
Ne keine Ahnung könntest du mir eine Beispiel geben oder mireinen entsprechenen link :?:
Alibi
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 458

Win2K SP3
Delphi 6 Ent
BeitragVerfasst: Sa 19.04.03 14:10 
Hilfe->WindowsSDK. ;)
Andreas Pfau
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 997



BeitragVerfasst: Sa 19.04.03 14:39 
Furchtbar einfache:

ausblenden Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
uses
  MmSystem;

{ ... }

var
  J: TJoyInfo;
  PosX, PosY, PosZ: Cardinal;
  Button1, Button2, Button3, Button4: Boolean;
begin
  JoyGetPosEx(JoystickId1, @J);
  PosX := J.wXpos;
  PosY := J.wYpos;
  PosZ := J.wZpos;
  Button1 := J.wButtons And Joy_Button1 <> 0;
  Button2 := J.wButtons And Joy_Button2 <> 0;
  Button3 := J.wButtons And Joy_Button3 <> 0;
  Button4 := J.wButtons And Joy_Button4 <> 0;

  { ... }

end;


Alles klar? JoyGetPosEx() funzt ähnlich, schau halt mal in der SDK nach.

_________________
Life is a bad adventure, but the graphic is really good!
Tar-Minyatur Threadstarter
Hält's aus hier
Beiträge: 10



BeitragVerfasst: Mo 21.04.03 13:40 
Danke