problems with switching to new version, button naming different

hello,
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 :slight_smile: 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…

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

ok, ill keep replying to myself :slight_smile:

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.

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 :slight_smile:

Endolf

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 :slight_smile: