Java-Gaming.org    
Featured games (79)
games approved by the League of Dukes
Games in Showcase (477)
Games in Android Showcase (107)
games submitted by our members
Games in WIP (536)
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 06: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: http://pastebin.java-gaming.org/ea3436d3d4d

Out of curiosity, I also did some research into where those "trigger happy" button codes came from. Found this commit that describes the reasoning: https://github.com/torvalds/linux/commit/cf2f765f1896064e34c6f0f2ef896ff058dd5c06. 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 15: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]
 

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

The first screenshot will be displayed as a thumbnail.

Riven (20 views)
2014-07-29 18:09:19

Riven (13 views)
2014-07-29 18:08:52

Dwinin (12 views)
2014-07-29 10:59:34

E.R. Fleming (31 views)
2014-07-29 03:07:13

E.R. Fleming (12 views)
2014-07-29 03:06:25

pw (42 views)
2014-07-24 01:59:36

Riven (42 views)
2014-07-23 21:16:32

Riven (28 views)
2014-07-23 21:07:15

Riven (29 views)
2014-07-23 20:56:16

ctomni231 (60 views)
2014-07-18 06:55:21
HotSpot Options
by dleskov
2014-07-08 03:59:08

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:58:24

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:47:22

How do I start Java Game Development?
by ra4king
2014-05-17 11:13:37

HotSpot Options
by Roquen
2014-05-15 09:59:54

HotSpot Options
by Roquen
2014-05-06 15:03:10

Escape Analysis
by Roquen
2014-04-29 22:16:43

Experimental Toys
by Roquen
2014-04-28 13:24:22
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!