Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (754)
Games in Android Showcase (229)
games submitted by our members
Games in WIP (842)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
   Home   Help   Search   Login   Register   
  Show Posts
Pages: [1]
1  Java Game APIs & Engines / JInput / Re: updating linux stick button mappings on: 2013-02-26 05:09:31
That's awesome, thank you!

I was able to figure out how to build jinput from source. Using your new native definitions I added the other fixes I mentioned in my original post and everything works way better now. Here is the patch of what I did:

Out of curiosity, I also did some research into where those "trigger happy" button codes came from. Found this commit that describes the reasoning: Incidentally, as of october 2012, these codes have been moved from include/linux/input.h to include/uapi/linux/input.h. I'm not sure how you're generating that definitions file but you might trip on this sometime in the future.
2  Java Game APIs & Engines / JInput / updating linux stick button mappings on: 2013-02-25 14:19:03
I'm having some trouble using jinput with my wireless xbox 360 gamepad on linux. I did some digging into the source and found a couple of problems.

  • The linux plugin NativeDefinitions file says that it's generated from /usr/include/linux/input.h, but hasn't changed in svn in 7 years. A quick comparison against my actual input.h from kernel 3.5.0 shows a lot of differences. Specifically, what's really tripping me up is that it's missing the button codes in the 0x200 range. My gamepad, for instance, is generating codes in this range for the d-pad.
  • Related to the previous point is that the LinuxNativeTypesMap is also out-of-date. For instance, there doesn't appear to be an entry for BTN_START, causing the "start" button on my gamepad to show up as an "unknown" button.
  • Finally, in LinuxNativeTyepsMap.getButtonID, the code is creating a Key.UNKNOWN object instead of a Button.UNKNOWN object when the native button id isn't recognized. I'm using jMonkeyEngine, which expects a joystick to only have buttons and axes, so even though jinput is reporting 5 "unknown" components, jME is throwing them away because they're keys. This might be something to fix in jME but I also believe that returning a key from getButtonID is a defect.

I'd love to get these problems fixed to support the linux gaming community (and my project Grin ). I'm looking for some help here to either have the library updated or, alternatively, get some assistance with building the project so I can fix it myself and submit a patch. Can anyone offer advice?
Pages: [1]
DesertCoockie (22 views)
2018-05-13 18:23:11

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

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

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

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

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

Solater (97 views)
2018-03-17 05:04:08

nelsongames (170 views)
2018-03-05 17:56:34

Gornova (388 views)
2018-03-02 22:15:33

buddyBro (1048 views)
2018-02-28 16:59:18
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!