Reply – JInput integration in NEWT?
Your Name
Subject
Message
or Cancel
In Reply To
JInput integration in NEWT?
— by gouessej gouessej
Hi

JInput is an API allowing to manipulate controllers (pads, joysticks, etc...), mouses and keyboards. I would like to use it but under Windows, it relies on DirectInput which is almost no more maintained by Microsoft which prefers working on XInput.

You can find its source code here:
http://java.net/projects/jinput/sources/svn/show/trunk

Would someone need such an API in NEWT? I would like to support controllers in my game.

What are the viable alternatives to DirectInput/XInput on Windows? StreamInput?

In my humble opinion, StreamInput is the only possibility, the traditional Windows event loop might not be fast enough for this and... I prefer relying on open source APIs ;)

Would it be difficult to adapt JInput to be built with GlueGen?

Is the use of JInput as a starting point a good idea whereas it does not use StreamInput?

Best regards.

Edit.: The Windows Message Pump is explained a bit here:
http://programming4.us/Multimedia/3930.aspx

Edit2.: Raw inputs on Windows are explained here:
http://msdn.microsoft.com/en-us/library/ms645536%28v=vs.85%29.aspx

Edit3.: Actually, JInput can use raw input or DirectX, it is better than I thought

Edit4.: The raw input only allows to manipulate the keyboards and the mice :(
Julien Gouesse | Personal blog | Website