Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (495)
Games in Android Showcase (114)
games submitted by our members
Games in WIP (563)
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 1923 times)
0 Members and 1 Guest are viewing this topic.
Offline JeroenF

Junior Newbie





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

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 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:
1  
2  
3  
4  
5  
6  
7  
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


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

Endolf

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  
 
 
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.

Dwinin (29 views)
2014-09-12 09:08:26

Norakomi (57 views)
2014-09-10 13:57:51

TehJavaDev (79 views)
2014-09-10 06:39:09

Tekkerue (40 views)
2014-09-09 02:24:56

mitcheeb (59 views)
2014-09-08 06:06:29

BurntPizza (45 views)
2014-09-07 01:13:42

Longarmx (30 views)
2014-09-07 01:12:14

Longarmx (36 views)
2014-09-07 01:11:22

Longarmx (36 views)
2014-09-07 01:10:19

mitcheeb (40 views)
2014-09-04 23:08:59
List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06

List of Learning Resources
by SilverTiger
2014-07-31 11:54:12

HotSpot Options
by dleskov
2014-07-08 01:59:08
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!