another (very) basic test app

this app basically displays lines for all the analog Axes on all the plugged in controllers, and a box that moves with the mouse input.

http://www.adam.com.au/kellyjones/java/AnalogDisp.jar

The way the mouse input is handled seems odd. can anyone with a mac or linux check this out? the box should move just like the mouse cursor. maybe slower or faster, but not with a capped speed.

edit: fixed this:

I still havent worked out how to have a JAR file work with the jinput jars, there’s a BAT file in the zip that has the command you need to use to run it…

i am assuming that the jinput files are just in the same directory as this JAR here, but i’d be interested to know from those of you who have installed it correctly into your JRE whether it works without them there.

Works for me by typing “java -jar AnalogDisp.jar”. I have installed jinput and the plugins as extension (WinXP).

You can add the line
“Class-Path: jinput.jar jutils.jar”
to your jar manifest. After doing this a separate batch files or zipping is not needed. This even works for people who have installed jinput as an extension (availability of the files besides your application is not needed for them).

PS: The classpath doesn’t need the . (dot).

Regarding the mouse problem:
In this thread it is mentioned that the current implementation fo the mouse movement differs from the Mac and Linux implementation in the detail that DInput only returns normalized values.

http://www.JavaGaming.org/cgi-bin/JGNetForums/YaBB.cgi?board=jinput;action=display;num=1059640919

thanks for that, i thought i had tried that before but i must have not quite got it right cause when i added the line exactly as you said, it worked.

edited original post’s link to the new file. it’s now a single jar, added source, though it’s rough.

Mac OS X 10.2.8 Java 1.4.1_01
It doesn’t not show all axis of all controllers.
It only shows the trackpad of my powerbook, even though I have a USB mouse plugged in as well.

Movement seems to be working, but it is choppy (and of course the acceleration doesn’t match the mouse pointer, so the box appears to be moving slow - normal I think). FPS fluctuates between 30 and 50. Goes as low as 7 FPS if I make the window bigger!!

Controllers themselves are only detected currently in the OSX port, they are not yet realized.

I thought the Mouse support was complete for OSX?

I noticed that this app randomly chooses between finding the trackpad or the USB mouse when I start it up.

it was only supposed to show axis of controllers of type"Stick"

but i’ve just uploaded a modified one, which is supposed to show all analog axes.

here:
http://www.adam.com.au/kellyjones/java/AnalogDispAll.jar

edit: mouse polling seems to be broken. dunno what caused that.
it’s not really in my interests to use jinput for any kind of mouse or keyboard input, AWT works fine for that, but for controllers, JInput works great.