alt Linux plugin: competition spurs the business

I couldn’t resist. I was interested in JNI and after finishing my first JInput plugin using SDL I needed more … the result is an alternative JInput plugin for Linux using the event interface of the Linux kernel.

It has the following features (which are not or only partially available in the ‘official’ plugin):

  • multiple event devices belonging to the same physical device result in only one Controller
  • all keys work on KB (especially the ones I mentioned not working in another thread)
  • unsuitable event devices (eg. PC speaker) will not make up a Controller
  • native plugin can be compiled for all Linux-supported hw architectures (unmodified Java classes will fit to every JNI library)
  • some phantom features are filtered out (source doc explains that)
  • simpler device type (Controller.Type) identification
  • uses longer self-explaining JNI library name

things I intentionally made different:

  • no subcontrollers
  • mice/kb are not special
  • all the important stuff is done on the good side of JNI
    (some people might guessed that :slight_smile: )

things which are missing:

  • no rumbler support (lack of knowledge, but therefore only read access to the event device files is needed)
  • no proper names for the Axis instances (just wrapped Cs constant names in brackets)
  • not really cared for Axis.Identifier (anyway its broken in the core API and other plugins)
  • there is much API doc but I have copied some classes/interfaces from my SDL plugin and have not updated the doc therein
  • ant build script is one my finest but it was copied from another project too and needs some cleanup

the files are here:
binary:

www.inf.fu-berlin.de/~rschuste/java/linux-eventinterface-jinput-plugin-0.1-bin.zip

source code (not sure about the license - depends on the interest on it. I have no intention to block JInput by chosing LGPL although I would prefer it.)

www.inf.fu-berlin.de/~rschuste/java/linux-eventinterface-jinput-plugin-0.1-src.zip

And dont think I want to spoil the party: I have already written endolf what I found out how some problems with the official plugin can be solved.

Btw: I am in need of people who can check for portability (64bit) issues in the native code.

Now test this thing and tell me whether it behaves nicely in your environment.

Terrific!

I don’t ,see any problems with multiple plug-ins. The key is just that the APi inertface remains consistant :wink: This is one of tbe beuties of the plug-in approach, it leaves chocie up to the developers :slight_smile:

Nice work!

Unfortunately we now have a choice of plugins on Linux where very few people will ever use it and a lack of support on the platform Java gaming has a real chance on… Mac.

Still, good job.

Kev

Thanks :slight_smile:

How did the SDL people got joystick support to work? SDL is LGPL IMHO its not fobidden to get answers from sources …

Gregory Pierce laid the groundwork for the Mac plugin and got the mouse and keyboard (mostly) working. I have done a bit of work to get my gamepad working. But it needs more work. I may move some of the code to LWJGL because theyare deparate for working input on Mac when AWT threads are active.

It isn’t all that difficult… but it is time consuming… and of course I thought I was going to have time for this before and… well,… didn’t.

Hi
The linux plugin I wrote (I hate calling it the official one, it’s just the first one that was done :)), is currently in tiny little pieces whilst I break and fix a few things, one of which is supposed to be rumbler support, I’m also trying to move some junk from the jni side to the java side, if nothing else this should unbreak a few of my bugs :). I might also make it so any event device that does show up with no buttons or axis is removed. I also have some sig faults to fix (oops). I think i’ll delay releaseing it untill we sort out these axis identifiers.

Cheers

Endolf