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  
  problems with switching to new version, button naming different  (Read 2893 times)
0 Members and 1 Guest are viewing this topic.
Offline JeroenF

Junior Newbie

« Posted 2008-03-28 13:58:28 »

little introduction first... i've used jinput just before newyear to make a quiz. i used an 20button gamepad with no axis, just buttons. everyting worked perfectly. this was on osX.
now i am trying to rewrite my quiz and picked the new jinput release from the site and it seemed that the identification of the buttons was changed from numbers to names (used to be 1,2,3,4 -> is now "PINKY", "THUMB", etc) this is on ubuntu.
everyting fine with me, but it seems that it doesnt supprt 20 buttons anymore. it just says "UNKNOWN" for 3 buttons.... that's a pity Smiley has jinput run out of names or something? or has it something to do with the platform (linux/osx)?

anyway this can be resolved? i would really like to keep using all the buttons on my gamepad, and i suppose a new release should be better than keep using an old one...
Offline JeroenF

Junior Newbie

« Reply #1 - Posted 2008-03-28 14:27:41 »

i think i got my question parrtially answered with this tread link
am i right?
Offline JeroenF

Junior Newbie

« Reply #2 - Posted 2008-03-28 16:04:31 »

ok, ill keep replying to myself Smiley

did a lot of thinking on my way home during 2 hours in the train...
got it solved like this:
private int getComponentId(Component c)
        Component[] components = this.qc.getComponents() ;
        for(int i =0; i< components.length; i++)
            if(components[i] == c) return i;
        return -1;

will this be reliable? Pesronally i think it does, the output was the same as on my mac, as far as i can remember... the only difference was that on my mac the getName() was an number, in the same range and order of the output produced by this method.
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline endolf

JGO Coder

Medals: 7
Exp: 15 years

Current project release date: sometime in 3003

« Reply #3 - Posted 2008-03-31 18:50:18 »

Sorry, I've been away for the weekend. This is a platform thing. Virtually everything going on in jinput is a wrapper around the native platform functionality (with some extras and no doubt bugs). I think this is one of those cases where the linux kernel says it doesn't know what it is, so thats what we pass on. It's been that way for a while so I'm guessing you had some pretty out of date jinput binary before. You might find there are some bug fixes in that one you have Smiley


Offline JeroenF

Junior Newbie

« Reply #4 - Posted 2008-05-20 10:33:40 »

Maybe a little late but i recently switched back to osX and the solution i found worked perfectly. Everything behaved like i thought.
Keep up the good work Smiley
Pages: [1]
  ignore  |  Print  

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

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

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

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

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

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

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

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

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

Solater (174 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!