Java-Gaming.org    
Featured games (91)
games approved by the League of Dukes
Games in Showcase (576)
games submitted by our members
Games in WIP (497)
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 1449 times)
0 Members and 1 Guest are viewing this topic.
Offline Modus Pwnens

Junior Newbie





« Posted 2008-04-19 16: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 17: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 Knight


Medals: 7
Projects: 1


Current project release date: sometime in 3003


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

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

Endolf

Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

xsi3rr4x (14 views)
2014-04-15 20:08:23

BurntPizza (12 views)
2014-04-15 05:46:01

UprightPath (25 views)
2014-04-14 19:39:50

UprightPath (11 views)
2014-04-14 19:35:47

Porlus (28 views)
2014-04-14 17:48:38

tom_mai78101 (50 views)
2014-04-10 06:04:31

BurntPizza (109 views)
2014-04-09 01:06:04

tom_mai78101 (209 views)
2014-04-05 15:34:39

trollwarrior1 (177 views)
2014-04-04 14:06:45

CJLetsGame (184 views)
2014-04-01 04:16:10
List of Learning Resources
by Longarmx
2014-04-08 05:14:44

Good Examples
by matheus23
2014-04-05 15:51:37

Good Examples
by Grunnt
2014-04-03 17:48:46

Good Examples
by Grunnt
2014-04-03 17:48:37

Good Examples
by matheus23
2014-04-01 20:40:51

Good Examples
by matheus23
2014-04-01 20:40:34

Anonymous/Local/Inner class gotchas
by Roquen
2014-03-11 17:22:30

Anonymous/Local/Inner class gotchas
by Roquen
2014-03-11 17:05:20
java-gaming.org 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‑gaming.org
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!