robotfire
Senior Newbie 
|
 |
«
Posted
2007-07-23 17:45:21 » |
|
Hi,
Before I say anything else, I would like to say that this project is incredible. I am working on a team that may control a hovercraft via a joystick, and this is exactly what I needed. I see that it is very responsive, and I should be able to easily send the data straight to the craft via sockets.
Now on to my problem: I have a Gravis Gamepad Pro that I brought in from home. The computer sees the gamepad just fine. However, jinput only sees the mouse and keyboard (no gamepad!!). What can I do to troubleshoot a problem like this? Is this gamepad not acceptable? What gamepad do you recommend?
Again, this is just phenomenal. I am thrilled that this exists.
Clint
|
|
|
|
|
oNyx
|
 |
«
Reply #1 - Posted
2007-07-23 17:52:40 » |
|
|
|
|
|
robotfire
Senior Newbie 
|
 |
«
Reply #2 - Posted
2007-07-23 18:31:15 » |
|
Unfortunately, I can't run that program from here. I get an error (probably because of security here). Is there another way to debug this sort of problem? I will try that link when I get home to see if I have any luck there.
I put my code in exactly the way it says to in the "Getting Started" section. I only see mouse and keyboard for inputs. I have Mouse with x-axis, y-axis, button 0 and button 1. I have keyboard with 126 components. I have nothing else!
It is a USB gamepad. Could that be the problem?
Clint
|
|
|
|
|
Games published by our own members! Check 'em out!
|
|
robotfire
Senior Newbie 
|
 |
«
Reply #3 - Posted
2007-07-23 18:36:38 » |
|
Also of note: When I do:
Controller[] ca = ControllerEnvironment.getDefaultEnvironment().getControllers();
I get two devices found in the debugger (DIMouse (0) and DIKeyboard(1)). I may just need to try other gamepads, or I may need to try a different computer. I am running on Windows NT if that means anything. My gamepad is definitely there when I go to "Gaming Options" in the Control Panel.
|
|
|
|
|
robotfire
Senior Newbie 
|
 |
«
Reply #4 - Posted
2007-07-23 19:52:41 » |
|
I tried that demo on another computer, and it worked perfectly. Can I have the source code for that???
Clint
|
|
|
|
|
oNyx
|
 |
«
Reply #5 - Posted
2007-07-23 20:10:09 » |
|
|
|
|
|
endolf
|
 |
«
Reply #6 - Posted
2007-07-23 20:31:37 » |
|
I´m on holiday atm, so I apologise for the late response.
What OS are you using?, which version of JInput?
If it´s Windows, check that dxdiags reports the controller happily. If it´s linux, check you have read access to the /dev/input/event* device node that represents the controller.
HTH
Endolf
P.S. It might be 48-72 hours before I next have net access.
|
|
|
|
endolf
|
 |
«
Reply #7 - Posted
2007-07-23 20:40:06 » |
|
Another demo is here. And the source for that is in the jinput cvs over at jinput.dev.java.net That one is pure jinput, and should be up to date. HTH Endolf
|
|
|
|
robotfire
Senior Newbie 
|
 |
«
Reply #8 - Posted
2007-07-23 21:12:03 » |
|
Trying another joystick, I still get the same result (not showing the gamepad, but showing keyboard and mouse). However, it IS in the "Input" tab of the DirectX Diagnostic Tool. I see "Mouse", "Keyboard", and "SideWinder Joystick" all in the DirectX Diagnostic tool.
I am using Windows 2000.
The distribution was downloaded today, and it is named "jinput_combined_dist_latest".
Thank you so much for the help and the awesome project. It's incredible!
Clint
|
|
|
|
|
robotfire
Senior Newbie 
|
 |
«
Reply #9 - Posted
2007-07-24 13:49:58 » |
|
I got it working using the lwjgl library. You guys obviously know more about it than I do, but my guess is the problem with the jinput "getting started" section is there isn't a mention of creating the controllers. In lwjgl, there is a create() method which creates my controllers.
I don't know if a "create()" method exists for jinput or not, but either way, this library is now working for me (through lwjgl), and it's just incredible.
Thanks again!!!!!
Clint
|
|
|
|
|
Games published by our own members! Check 'em out!
|
|
endolf
|
 |
«
Reply #10 - Posted
2007-07-26 12:57:02 » |
|
Hi
It sounds like I've broken something, the latest version of LWJGL is not using the latest version of JInput last time I checked (It's not that old, but they don't update it every single time JInput does).
JInput has no create method, you just call the getControllers method to get all the ones JInput knows about.
I have a hunch, but I'll have to investigate, let me get back to you.
Cheers
Endolf
|
|
|
|
endolf
|
 |
«
Reply #11 - Posted
2007-07-26 15:59:17 » |
|
Hi I can reproduce this now, fairly major screw up on my part I would say  , I'll work on it this afternoon if all goes to plan. Endolf
|
|
|
|
endolf
|
 |
«
Reply #12 - Posted
2007-07-26 17:01:24 » |
|
Hi Looks like it was a build problem. I've updated the webstart demo and uploaded a new distribution hereThat should work. Let me know  Endolf
|
|
|
|
robotfire
Senior Newbie 
|
 |
«
Reply #13 - Posted
2007-08-07 13:28:02 » |
|
Endolf, you are the man! I don't know what sort of sorcery you are performing to do this, but the API is fantastic.
Clint
|
|
|
|
|
endolf
|
 |
«
Reply #14 - Posted
2007-08-07 19:29:01 » |
|
Hi I wouldn't go that far, but it's always nice to hear when ones work is appreciated  . I would like to say that there have been other participants in JInput. Including in no particular order, Michael Martak, Thomas Daniel, Jeff Kesselman, Gregory Pierce and Elias Naur. Endolf
|
|
|
|
|