First of all, I really want to thank you guys for developing JInput. It really works great
and I really appreciate all the time you put in to this project (I hope I can do something
with it that makes it all worth it, lol)
Im having one issue when i try to poll my mouse.
Here is some background info:
- Im using the 3 apps from the FreeFodder tutorial by Robert Schuster
- it is a Logitech USB TrackBall mouse
- There is no version number anywhere but i downloaded my JInput binaries between
January and March of this year (2005) - Im using windows xp pro
Here is the get controllers list:
run:
[] Creating Saitek Cyborg Force Rumble Pad polling = true
[] 0 - Mouse Mouse (mouse)
[] 1 - Keyboard (Keyboard) (buttons)
[] 2 - Saitek Cyborg Force Rumble Pad Saitek Cyborg Force Rumble Pad (stick)
[] Create effect : DIERR_INVALIDPARAM
[] Create effect : DIERR_INVALIDPARAM
Here is the details for controller 0 (the mouse)
run:
[] Creating Saitek Cyborg Force Rumble Pad polling = true
[] name: Mouse Mouse
[] type: mouse
[] port: Unknown
[] subcontroller: 0
[] name: Mouse Mouse ball
[] type: ball
[] port: Unknown
[] axes:
[] 0 - X-axis - x - relative - arbitrary - analog - 0.0
[] 1 - Y-axis - y - relative - arbitrary - analog - 0.0
[] subcontroller: 1
[] name: Mouse Mouse buttons
[] type: buttons
[] port: Unknown
[] axes:
[] 0 - Button 0 - left - absolute - normalized - digital - 0.0
[] 1 - Button 1 - right - absolute - normalized - digital - 0.0
[] 2 - Button 2 - middle - absolute - normalized - digital - 0.0
[] 3 - Button 3 - side - absolute - normalized - digital - 0.0
[] 4 - Button 4 - extra - absolute - normalized - digital - 0.0
[] Create effect : DIERR_INVALIDPARAM
[] Create effect : DIERR_INVALIDPARAM
And this is the error i get if i try to poll anything (0-4) on the mouse
run:
[] Creating Saitek Cyborg Force Rumble Pad polling = true
[] The provided index is out of range for this controller.
[] Use a value between 0 and -1
[] Create effect : DIERR_INVALIDPARAM
[] Create effect : DIERR_INVALIDPARAM
So, yea, i cant use the mouse.
The game controller and the keyboard work perfectly though.
My two other questions:
1 - i downloaded JInput for windows about 6 months ago.
should i download a new version?
2 - is the only way to get game controller events to continuously poll in a timed thread
like the tutorial example?
Or is there a “Listener” type class that will return changes in the controller?
// installs a timer which is activated every 10 ms
new Timer(10, new ActionListener() {
public void actionPerformed(ActionEvent ae) {
// update all Axis instances of this controller
controller.poll();
// update the text field's contents
pollField.setText(String.valueOf(axis.getPollData()));
}
}).start();
Thanks for reading and for any help!