Hi !
Featured games (91)
games approved by the League of Dukes
Games in Showcase (757)
Games in Android Showcase (229)
games submitted by our members
Games in WIP (844)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Possible issue with controller type identification.  (Read 2136 times)
0 Members and 1 Guest are viewing this topic.
Offline Modus Pwnens

Junior Newbie

« Posted 2008-04-19 14:11:06 »

Hello! While learning to use the JInput libraries, I created some code to identify my 4-Axis game-pad. However, while it prints "USB 4-Axis 12-Button Gamepad"
it lists the type as  "Stick"

I did some research on these forums and found a thread where Endolf posted his ControllerReadTest. What has me confused is that his code appears to read my controller properly. When I personally try to poll the X and Y axises, I only read from the directional pad, and none of the other buttons or axes appear to be working.

Is the game-pad a "sub controller" of the D-pad?

I orginally created my project using another input library (JXInput), but it proved to be not very portable and troublesome. Thankfully I have an interface I can adapt to, and hopefully JInput will do the trick Smiley. It seems very good!

Here is the relevant portion of output related to my controller. The program is the "Getting Started" code,

"USB 4-Axis 12-Button Gamepad
Type: Stick
Component Count: 17
Component 0: Z Rotation
Component 1: Z Axis
Component 2: Y Axis
Component 3: X Axis
Component 4: Hat Switch
Component 5: Button 0
Component 6: Button 1
Component 7: Button 2
Component 8: Button 3
Component 9: Button 4
Component 10: Button 5
Component 11: Button 6
Component 12: Button 7
Component 13: Button 8
Component 14: Button 9
Component 15: Button 10
Component 16: Button 11"

Which appears correct for my gamepad but for the fact the controller is "Stick" type and I am unable to read the inputs.

Thank you very much for your time!
Offline Modus Pwnens

Junior Newbie

« Reply #1 - Posted 2008-04-19 15:20:48 »

My apologies, the practical portion of the issue was a result of my own code. I am able to read the axes and buttons just fine. Input was just being ignored on my own end because of the way I was adapting this library.

However, the observation still remains that my GamePad is being labeled as a Stick. Is this just a random consquence od dealing with a large variety of hardware and a fluke I should just ignore?
Offline endolf

JGO Coder

Medals: 7
Exp: 15 years

Current project release date: sometime in 3003

« Reply #2 - Posted 2008-04-19 20:51:00 »

JInput takes the type from what ever the device driver says, so it's not our fault Smiley


Pages: [1]
  ignore  |  Print  

EgonOlsen (78 views)
2018-06-10 19:43:48

EgonOlsen (58 views)
2018-06-10 19:43:44

EgonOlsen (78 views)
2018-06-10 19:43:20

DesertCoockie (260 views)
2018-05-13 18:23:11

nelsongames (158 views)
2018-04-24 18:15:36

nelsongames (157 views)
2018-04-24 18:14:32

ivj94 (898 views)
2018-03-24 14:47:39

ivj94 (162 views)
2018-03-24 14:46:31

ivj94 (811 views)
2018-03-24 14:43:53

Solater (175 views)
2018-03-17 05:04:08
Java Gaming Resources
by philfrei
2017-12-05 19:38:37

Java Gaming Resources
by philfrei
2017-12-05 19:37:39

Java Gaming Resources
by philfrei
2017-12-05 19:36:10

Java Gaming Resources
by philfrei
2017-12-05 19:33:10

List of Learning Resources
by elect
2017-03-13 14:05:44

List of Learning Resources
by elect
2017-03-13 14:04:45

SF/X Libraries
by philfrei
2017-03-02 08:45:19

SF/X Libraries
by philfrei
2017-03-02 08:44:05 is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!