First of all, I really want to thank you guys for developing JInput. It really works greatand I really appreciate all the time you put in to this project (I hope I can do somethingwith it that makes it all worth it, lol)

Im having one issue when i try to poll my mouse.

Here is some background info:- Im using the 3 apps from the FreeFodder tutorial by Robert Schuster- it is a Logitech USB TrackBall mouse- There is no version number anywhere but i downloaded my JInput binaries between January and March of this year (2005)- Im using windows xp pro

First of all, I really want to thank you guys for developing JInput. It really works greatand I really appreciate all the time you put in to this project (I hope I can do somethingwith it that makes it all worth it, lol)

Im having one issue when i try to poll my mouse.<snip>

And this is the error i get if i try to poll anything (0-4) on the mouse

Great! Thanks alot. Those were exactly the anwers i was looking for.I dont believe i was polling the mouse's subcontroller.The programs from the tutorial only polled regular controllers.Thanks again for the clarification!

but I took it over when he left Sun, did a bit of cleanup and then released it )

Then I got hold of it and butchured it to death

The DIERR_INVALIDPARAM messages are a bit worrying, I'll have to have a dig into it, my guess from not looking at the code is that it's creating effects the device doesn't support. This is worrying as if I recall right, it only tries to create 2, weak rumble and strong rumble.

Oh wow, haha. I didnt realize there were more posts in here! I came back to see if i could learn a little something from readingthe other posts.

>> The DIERR_INVALIDPARAM messages are a bit worrying, I'll have to have a dig into it

Yea. I didnt now what they meant - but everything was working well so I didnt worry about it.My controller doesnt have rumblers or "effects".I was kind of too ecstatic when i got the game controllers working at 2 in the morning to worry about it, haha.

>> I've stuck a new jinput windows build up here, it's got some more rumbler debug statements in it, >> can you test it can send me the results please?

I dont know if that was directed towards me or jeff - but since he recommended i update anyway - ill download a recent build and post the output i get.

Good News: Your debug statements came upBad News: You broke the 3 tutorial apps i was using, lol. Now the controller doesnt work.It probably has something to do with the files in this build being named differently than the filesin the build i had.

The Build I Had-----------------------jinput.jarjutils.jardxinput.jardxinput.dll

The Build I Downloaded from Your Link----------------------------------------------------------jinput.jarjinput-dxplugin.dll

Also, I apparently DO have rumble on my controller and never noticed.I also have a small button that says "digital" on it next to the small "rumble" buttonand also a mysterious little red button thats never done anything.

For the eagle eyed youll see the list lists my controller #5 and later i call it with #2 -I unplugged my keyboard and the index number changed.

Looks like you are using a fairly old build. That tutorial was written when we had some problems getting people up and running with it.

The build you are trying is the newer 'simple' builds, you'll find you have 1 jar and 1 dll, with the jar anywhere on your classpath, and the directory the dll is in being pointed to by java.library.path it will run fine.

eg.

say you have the following dir structure

appPath/binappPath/libappPath/src

where your own classes are compiled into bin (maybe in a jar), your source code for your own files is in src, and lib contains both the dll and the jinput.jar

just run java -cp <path to your own code>;appPath/lib/jinput.jar -Djava.library.path=appPath/lib/ <main class>

HTH

Thanks for running the tests, I can see that you have 4 axis that support effects, I only have two on the test stick I bought so I can't be certain, but I'll have a look. I'll have a hunt around and see if I can find out what other axis your devices supports and why it seems to cause jinput a problem.

>> That tutorial was written when we had some problems getting people up and running with it.

Haha, just my luck. I got it working the first time i tried -but the "easy" version stumps me.

Realistically I think the problem is the 3 apps from the tutorial.I think they are throwing a lot of the errors. So its not you, me or the builds.

The latest build didnt even get as far as listing the controllers.I havent had time recently - but today i think ill take the time to write my owndemo app and my guess is that everything will work just fine.

Because, if you look at my last post (#8 i think) in the controller details errors there is this line:

Did you change any of the method names?I think the app is trying to call a method that may have changed in the last 6 months (my orig version was from around February 05).

>> I *think* it's the P2500.

I didnt check the site but the controller says P2500 on the left controller arm so im *guessing* youre right, haha.I didnt even know that, haha. I should have posted that before. Sorry.

>> Thanks for running the tests

Seriously - Thank You. Ill run as many tests as you need, haha.Its well worth it. Im starting to write my first 3D app and the momenti can use a controller to traverse the environment i think im going to weep like a child, haha. So yea - thanks again, haha.

>> I've uploaded a new copy of the file, and updated the ant scripts.>> If you download the zip, and extract the 2 files

Er - youre going to have to forgive me - download from where?What ant scripts?https://jinput.dev.java.net/ ?In the "docs and files" i only saw 8-24-05 as the latest version.

Just in case i downloaded that one and I redownloaded the zip from the lastlink you posted (in case it pointed to a new zip) and ran both of them andgot the same error message.

>> There are javadocs on the jinput.dev.java.net files section, >> I can upload uncompressed ones to newdawnsoftware if people want.

What is newdawnsoftware?

>> it will run the test that come with jinput,

Sorry! I didnt know there were built in tests. i would have ran thoseinstead of that old tutorial had i known!

I was going to upgrade to 1.5 anyway. This is a dumb question im sure - but i can still write 1.4.2 compatible codewith 1.5 right?

Thanks again!

Run (same message for both downloads)---------------------------------------------------------------

C:\A\Java\JInput\JInput 8-28\2>java -cp jinput.jar -Djava.library.path=. net.java.games.input.test.ControllerReadTestException in thread "main" java.lang.UnsupportedClassVersionError: net/java/games/util/plugins/Plugins (Unsupported major.minor version 49.0) at java.lang.ClassLoader.defineClass0(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:539) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123) at java.net.URLClassLoader.defineClass(URLClassLoader.java:251) at java.net.URLClassLoader.access$100(URLClassLoader.java:55) at java.net.URLClassLoader$1.run(URLClassLoader.java:194) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:187) at java.lang.ClassLoader.loadClass(ClassLoader.java:289) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274) at java.lang.ClassLoader.loadClass(ClassLoader.java:235) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302) at net.java.games.input.ControllerEnvironment.<clinit>(ControllerEnvironment.java:73) at net.java.games.input.test.ControllerReadTest.<init>(ControllerReadTest.java:249) at net.java.games.input.test.ControllerReadTest.main(ControllerReadTest.java:299)

newdawnsoftware is where most of the jinput files end up. It's a server a friend and I run www.newdawnsoftware.com. The zip I gave you the other day came from there. jinput.dev.java.net just points to those files for some of them . I've not bothered updating the link on jinput as these builds for you are just debug builds.

You can build 1.4 compatable code with 1.5, the target="1.4" option should do it.

In case there is a cache or something in between, I've copied it to a new fille here.

Right, i've installed 1.4.2_09 on my windows box and actually read the error log you posted. It was jutils as well that needed rebuilding. I've done that, and uploaded a new dist here. I've tested it myself too

Endolf, You're a god. All is working perfectly.Mouse, Controller, Keyboard - all great.The first time i ran the test i got 4 of these on the command line:DI_BUFFEROVERFLOWBut the 2 times afterwards i only got that message once.I dont know what that means - but like i said everything worked perfectly.Im exhausted, today was a VERY long day, haha.I can sleep well knowing this works great.Thanks again for all your help!

Jeff, I think im going to update to 1.5. I write code in TextPad and i checked and it has a parameter line for the compiler so youre right - i think i can add that option inthere and not even have to worry about it.Thank god, haha.

Endolf, There is a bad error when running the test with my wireless keyboard.I never had the keyboard plugged in at the same time as the controllerso i never noticed.I just downloaded the source code for the ControllerReadTest,compiled it and ran it.I got the error (listed below) that just repeated over and over so itjammed everything else.I disabled the wireless desktop and it worked perfectly like before.Then I disabled the wireless mouse so i know its definitely the wireless keyboard.

From reading the error - it must be trying to poll something out of boundswhich is why the error repeats every time there is a poll.

yup, thats right - a tilting scroll wheel on the mouse.im living the dream.

java.lang.ArrayIndexOutOfBoundsException: 165 at net.java.games.input.DirectInputAxis.getPollData(DirectInputAxis.java:148) at net.java.games.input.test.AxisPanel.poll(ControllerReadTest.java:74) at net.java.games.input.test.ControllerWindow.poll(ControllerReadTest.java:235) at net.java.games.input.test.ControllerReadTest$1.run(ControllerReadTest.java:262) at java.lang.Thread.run(Thread.java:534)java.lang.ArrayIndexOutOfBoundsException: 166 at net.java.games.input.DirectInputAxis.getPollData(DirectInputAxis.java:148) at net.java.games.input.test.AxisPanel.poll(ControllerReadTest.java:74) at net.java.games.input.test.ControllerWindow.poll(ControllerReadTest.java:235) at net.java.games.input.test.ControllerReadTest$1.run(ControllerReadTest.java:262) at java.lang.Thread.run(Thread.java:534)

You do indeed have 4 rumblers in that beast. I think its a trivial task to get it working, but have no way of testing it.

The DI_BUFFEROVERFLOW is because direct input buffers up all it's events untill you call a poll, if the device fills the buffer up before you do that, you get an overflow, i've already increased the buffer size, but I can do so again if we need too, although I suspect that only happened on startup before you did the first poll.

As for the keyboard issue, I'll take a good look tonight, that was with the new code i've been sending you not the old code wasn't it?

Yea those tests were with the brand new code (the 8-29.zip).I dont need the rumblers to work - remember i didnt even know i had rumblers, haha.Id be glad to help you by testing anything though if youreresolved to fix that problem.

The code works perfect.The keyboard thing isnt a big deal for me because ill neverhave any reason to poll the wireless keyboard.I thought i would mention the error though in case it causessome else any problems.Is there a built-in max for the number of keys a keyboard can have?This keyboard seems to have a lot of buttons maybe thats the issue?Also, how would JInput even handle the "zoom slider" thing-a-ma-bobon the keyboard? Hmm, that actually would be a bad-ass thing to incorporate into a game, lol.

Anyway, jesus man isnt like 6am where you are?Its 3 am, im off to bed.Ill check in tomm (or rather tonight).

Sorry, nope. Tuesday evening I was working on the Linux rumbler code, and last night we had power issues all night. It's typical that the battery on the UPS died about a week ago, so when the power went, my machines just stopped. Otherwise I could have carried on working , not for the first time .

So, if anyone has a good battery for a APC smart UPS 1400 going, let me know

Updated the windows build here. This adds an attempt (can't test it) at supporting more than 2 rumblers on a device, and some more debug for TuringPest's keyboard issue.

I'm not sure about the 4'th axis on the mouse. I've done a quick google and got nothing about dealing with it, like where the data is in the directx layer. The directx 8 mouse object doesn't have any info on it. At the moment jinput on windows run on dx8, so unless I find something that says it's dx9 only, i'm not sure what to do (apart from more googling ).

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