Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (521)
Games in Android Showcase (127)
games submitted by our members
Games in WIP (589)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Newest JINPUT: 3 versions of linux fail after GetControllers  (Read 3058 times)
0 Members and 1 Guest are viewing this topic.
Offline taifunbrowser

Senior Newbie





« Posted 2008-03-26 04:03:09 »

Code:

ControllerEnvironment evn = ControllerEnvironment.getDefaultEnvironment();
Controller[] controllers = evn.getControllers();

Output: (reproducible on all 3 of my friend's linux boxes)

 Loading: net.java.games.input.LinuxEnvironmentPlugin
 Failed to open device (/dev/input/event6): Failed to open device /dev/input/event6 (13)
 
 Failed to open device (/dev/input/event5): Failed to open device /dev/input/event5 (13)
 
 Failed to open device (/dev/input/event4): Failed to open device /dev/input/event4 (13)
 
 Failed to open device (/dev/input/event2): Failed to open device /dev/input/event2 (13)
 
 Failed to open device (/dev/input/event1): Failed to open device /dev/input/event1 (13)
 
 Failed to open device (/dev/input/event0): Failed to open device /dev/input/event0 (13)
 
 Linux plugin claims to have found 0 controllers

^ what is "hopeful" is that it does say "claims to have found 1 controllers" whenever we plug in our DDR dance mat to the usb adaptor Tongue

I've seen posts handling this bug, but I fear it's... reemerged? BTW the application works beautifully on my windows

err heres the applet: http://dragonfire.exofire.net/lightningsteps/Java

http://beam.to/jtouhou - the JTouhou project! Mixed 3d and 2d, a multiplatform port for the classic dojin-soft series by Shanghai alice!
Offline endolf

JGO Coder


Medals: 7
Exp: 15 years


Current project release date: sometime in 3003


« Reply #1 - Posted 2008-03-27 00:27:48 »

It's not a bug. It's the way linux works. See this thread, and this one.

HTH

Endolf

Offline taifunbrowser

Senior Newbie





« Reply #2 - Posted 2008-03-27 03:22:37 »

Thanks, me and my friend are looking for a way to give embedded applets in linux firefox root access. Because it's already signed, and has read privvies... but somehow can't read these linux files

because that's what we're doing.

http://beam.to/jtouhou - the JTouhou project! Mixed 3d and 2d, a multiplatform port for the classic dojin-soft series by Shanghai alice!
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline endolf

JGO Coder


Medals: 7
Exp: 15 years


Current project release date: sometime in 3003


« Reply #3 - Posted 2008-03-27 18:00:41 »

There are security implications in reading those files, which is why they are not readable by default on most distributions. The way round this is for the admin on the system to give read (or for rumble support read/write) access to the user(s) running the jinput application. You could run an application as root. You might get root privs in the applet running the browser as root also, which would stop the need for changing the file permissions.

HTH

Endolf

Offline taifunbrowser

Senior Newbie





« Reply #4 - Posted 2008-05-23 03:27:38 »

Sorry for necroing my old thread, but I gotta solve this problem.

My game is really coming along, and works beautifully on mac & Windows. However, my linux friends have decided that it is unacceptable to run the game as root.

Here is some of the joystick input code Stepmania uses, which does NOT have to be run as root to get to full and superfast joystick access:
http://sourceforge.net/mailarchive/forum.php?thread_name=20080105053904.GF16723%40machine.or.cz&forum_name=stepmania-devs

How high on the priority list is getting non-root access working on linux? A simple switch to disable force feedback (Since I need it for nothing) may help, but it looks like we're having trouble even reading (Stepmania, once again, gets full access to my dance pads whereas jinput gets the "failed to create device" error)

Please?

http://beam.to/jtouhou - the JTouhou project! Mixed 3d and 2d, a multiplatform port for the classic dojin-soft series by Shanghai alice!
Offline endolf

JGO Coder


Medals: 7
Exp: 15 years


Current project release date: sometime in 3003


« Reply #5 - Posted 2008-05-27 06:35:12 »

Hi

For a long time (2 years or so) JInput will fall back to no force feedback if it can't open the ev node as read write. If it can't open it at all it will just move on. You still need read access to the event nodes if you want to use them, but the joystick nodes should also be checked, so even if you have no permissions, some limited functionality should still be available on joysticks. What is the latest version you have tried with?

Endolf

Offline taifunbrowser

Senior Newbie





« Reply #6 - Posted 2008-05-27 13:11:55 »

A call to the Version.getVersion() class returned

2.0.0-b01

Anyway, I've been working on the other parts of my game pretty heavily the past month (being able to use controllers on the developing system, windows, made this possible), so I'll get the newest version this afternoon and try it out again on my friends' computers.

Sorry for posting a rant and not following up on it, i'll get back to you later today.

http://beam.to/jtouhou - the JTouhou project! Mixed 3d and 2d, a multiplatform port for the classic dojin-soft series by Shanghai alice!
Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

xFryIx (57 views)
2014-11-13 12:34:49

digdugdiggy (35 views)
2014-11-12 21:11:50

digdugdiggy (29 views)
2014-11-12 21:10:15

digdugdiggy (23 views)
2014-11-12 21:09:33

kovacsa (46 views)
2014-11-07 19:57:14

TehJavaDev (50 views)
2014-11-03 22:04:50

BurntPizza (50 views)
2014-11-03 18:54:52

moogie (65 views)
2014-11-03 06:22:04

CopyableCougar4 (63 views)
2014-11-01 23:36:41

DarkCart (148 views)
2014-11-01 14:51:03
Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06
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
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!