kevglass
|
 |
«
Posted
2005-10-28 11:57:41 » |
|
As you know, LWJGL input is now a wrapper round JInput. Got this report recently: http://lwjgl.org/forum/viewtopic.php?t=1237?Is there some special setup required on a linux box to enable JInput to work? If so, is there a setup guide somewhere (wiki) ? Kev
|
|
|
|
endolf
|
 |
«
Reply #1 - Posted
2005-10-28 17:12:49 » |
|
Any chance of getting some of the log messages that jinput under linux spews out?  I suspect it has something to do with the fact that jinput looks under /dev/input for all the files, not /dev. Each distro seems to layout /dev differently, just to confuse the issue. I sence a patch to try reading /dev/input, then trying /dev for js devices if none are found in /dev/input. I'd still like the logs to check  Endolf
|
|
|
|
kappa
|
 |
«
Reply #2 - Posted
2005-10-28 21:02:45 » |
|
where are the logs kepts?
|
|
|
|
Games published by our own members! Check 'em out!
|
|
endolf
|
 |
«
Reply #3 - Posted
2005-10-28 21:49:16 » |
|
Thats up to javaws, it seems that there are a bunch of files in ~/.java/deployment/log under java 1.5
They are named nothing useful.
Endolf
|
|
|
|
kevglass
|
 |
«
Reply #4 - Posted
2005-10-29 08:08:47 » |
|
The distro in question did indeed have the /dev/js - jinput checking both just seem to make sense.. maybe even configurable? Not to pile on the work - but would it possible to catch the case where /dev/whatever can't be found and throw a bespoke exception (UnableToFindTheSoddingDeviceException ?  ) so that users could detect it and display a sensible message "Please Move Your Devices around and break your distro" Kev
|
|
|
|
endolf
|
 |
«
Reply #5 - Posted
2005-10-30 21:57:02 » |
|
Updates done but not yet tested for checking /dev after /dev/input First attempt at freeing some of the memory from the init processes No longer read the 0th element if no device files are found. No exception yet for kev  Endolf
|
|
|
|
kevglass
|
 |
«
Reply #6 - Posted
2005-11-03 14:22:12 » |
|
Are these builds available somewhere?
You pointed at me via IM but they don't seem to have natives in?
Kev
|
|
|
|
endolf
|
 |
«
Reply #7 - Posted
2005-11-03 19:14:48 » |
|
|
|
|
|
endolf
|
 |
«
Reply #8 - Posted
2005-11-03 22:09:22 » |
|
Hi
With the help of kappaOne the issue is known. I'm away this weekend, but I hope to look at it whilst away and commit changes monday.
Endolf
P.S.
Endolf, in case you are reading this over the weekend and have forgotten what the issue is, you are ignoring joysticks that don't have an event device with them.
P.P.S. was that intentional due to some nastyness with joysticks???
P.P.P.S. Take your gamepad with you to test over the weekend
|
|
|
|
endolf
|
 |
«
Reply #9 - Posted
2005-11-06 10:54:08 » |
|
Hi
I think it's done, I don't have a net con from linux in the hotel, so it'll have to wait till tonight for a build to be uploaded and tested.
Endolf
|
|
|
|
Games published by our own members! Check 'em out!
|
|
endolf
|
 |
«
Reply #10 - Posted
2005-11-07 21:55:49 » |
|
Webstart demo updated new d/l hereEndolf P.S. Expect it to sigsegv, if it does, please send me the whole output.
|
|
|
|
kappa
|
 |
«
Reply #11 - Posted
2005-11-08 21:55:03 » |
|
ok still failing to get the joypad detected properly but is moving a step closer to working, heres the latest output native output 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
| Initing event interface Initing joystick interface Trying to open /dev/input/js0 Opened /dev/input/js0, trying to get device name Getting button and axes information for /dev/input/js0 Initialisation of /dev/input/js0 completed Trying to open /dev/input/js1 Failed to open device /dev/input/js1 Trying to open /dev/input/js2 Failed to open device /dev/input/js2 Trying to open /dev/input/js3 Failed to open device /dev/input/js3 Getting the number of event devices Getting 0 event devices Getting the number of joystick devices Getting 1 joystick devices Copying joystick device 0 to jinput device list 0 |
jws output (btw this is with Typhoon game) 1 2 3 4 5 6 7 8 9 10 11 12
| creating input stuff OS name is: Linux Linux plugin is supported OS name is: Linux Linux plugin is supported Initing JInputLibrary Shutdown thread created and run OS name is: Linux Linux plugin is supported 0 Controllers Found Waiting on monitor 800 x 600 x 24 @60Hz |
oh btw no need to worry about uploading natives everytime now, cos i found a easy way to get native output when using java webstart, if you just run the jnlp through a console, native output comes on the console window and java webstart output on the java console.
|
|
|
|
dwithers
Junior Newbie
|
 |
«
Reply #12 - Posted
2005-11-11 16:01:38 » |
|
Hi all,
I was trying JInput on Linux and came across this thread when trying to resolve the same problem. I noticed that the joystick appears to be detected, but not until my program has exited. I've got test code and its output, which I've attached to this post.
It was run on a Slackware 10.2 system with JDK 1.5.0_04 and one joystick on /dev/input/js0. I hope it helps.
|
|
|
|
endolf
|
 |
«
Reply #13 - Posted
2005-11-11 20:14:30 » |
|
Hi New webstart version and new build here. Endolf
|
|
|
|
kappa
|
 |
«
Reply #14 - Posted
2005-11-11 20:57:33 » |
|
ok good news just tried JInput through JWS and it works native code 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
| Initing event interface Initing joystick interface Trying to open /dev/input/js0 Opened /dev/input/js0, trying to get device name Getting button and axes information for /dev/input/js0 Initialisation of /dev/input/js0 completed Trying to open /dev/input/js1 Failed to open device /dev/input/js1 Trying to open /dev/input/js2 Failed to open device /dev/input/js2 Trying to open /dev/input/js3 Failed to open device /dev/input/js3 Getting the number of event devices Getting 0 event devices Getting the number of joystick devices Getting 1 joystick devices Copying joystick device 0 to jinput device list 0 Gettign device name for jinput device 0. jinput device 0 is 135050352 Gettign device name for jinput device 0, (SAITEK Tournament Pad) Gettign number of absolute axes for jinput device 0 (3) Gettign number of relative axes for jinput device 0 (0) Gettign number of buttons for jinput device 0 (8) Getting bus type for device 0 Getting supported buttons for jinput device 0 Getting suported relative axes for jinput device 0 Getting suported absolute axes for jinput device 0 Getting fuzz data for axis 0 on device 0 Getting absolute axes minimum value data for axis 0 on device 0 Getting absolute axes maximum value data for axis 0 on device 0 Getting fuzz data for axis 1 on device 0 Getting absolute axes minimum value data for axis 1 on device 0 Getting absolute axes maximum value data for axis 1 on device 0 Getting fuzz data for axis 2 on device 0 Getting absolute axes minimum value data for axis 2 on device 0 Getting absolute axes maximum value data for axis 2 on device 0 Getting supported buttons for jinput device 0 Getting FFEnabled status for device 0 |
java console output 1 2 3 4 5 6 7 8 9 10 11
| OS name is: Linux Linux plugin is supported OS name is: Linux Linux plugin is supported Initing JInputLibrary Shutdown thread created and run Java working on device SAITEK Tournament Pad Java code thinks FF is disabled for device SAITEK Tournament Pad Linux plugin claims to have found 1 controllers Component count = 11 Waiting on monitor |
works great and detects all the buttons, however just one thing when i run the jws two windows pop up one with the title SAITEK Tournement Pad and another blank window with title Controller Read Test, is this normal? good work on getting it up and running! 
|
|
|
|
chrisw1229
Senior Newbie 
|
 |
«
Reply #15 - Posted
2005-11-12 06:34:13 » |
|
Yes the 2 windows are normal from my experience. The test program creates 1 window for each device it detects and one window as the main parent window. So if you close the blank window it closes all the other ones and shutsdown the program.
|
|
|
|
endolf
|
 |
«
Reply #16 - Posted
2005-11-12 16:54:18 » |
|
Hi Kev's spot on, it does indeed open a window per device and the main one. If it detects a mouse it will open 3 for that device, one for the main mouse, one for the ball and one for the buttons. If you feel brave enough, compile a kernel with the event interface enabled and you mouse, keyboard, joystick, and anything else plugged in will show up. If you have a USB scanner with 3 buttons for example, jinput will detect it and allow you to use the buttons in a game  Endolf
|
|
|
|
Jeff
|
 |
«
Reply #17 - Posted
2005-11-13 02:07:16 » |
|
Yes thats normal. Just my quick and crappy programming on the demo  The mainf rame is there so you can end the app by closing it. Each controlelr then gets its own frame. JK
|
|
|
|
dwithers
Junior Newbie
|
 |
«
Reply #18 - Posted
2005-11-14 20:36:03 » |
|
The new build works perfectly for me as well. Thanks! 
|
|
|
|
|