From cca9405b8dde9ba06a6d331447c39d156f6a94f9 Mon Sep 17 00:00:00 2001 From: endolf Date: Thu, 3 Nov 2005 22:00:11 +0000 Subject: Fixes for js devices that are read only git-svn-id: file:///home/sven/projects/JOGL/git-svn/svn-server-sync/jinput/trunk@127 e343933a-64c8-49c5-92b1-88f2ce3e89e8 --- plugins/linux/src/java/net/java/games/input/LinuxEnvironmentPlugin.java | 2 ++ plugins/linux/src/native/JoystickDevice.cpp | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'plugins/linux') diff --git a/plugins/linux/src/java/net/java/games/input/LinuxEnvironmentPlugin.java b/plugins/linux/src/java/net/java/games/input/LinuxEnvironmentPlugin.java index 4dcb27f..8883691 100644 --- a/plugins/linux/src/java/net/java/games/input/LinuxEnvironmentPlugin.java +++ b/plugins/linux/src/java/net/java/games/input/LinuxEnvironmentPlugin.java @@ -45,6 +45,8 @@ public class LinuxEnvironmentPlugin extends ControllerEnvironment implements Plu } else { controllers = new Controller[0]; } + + System.out.println("Linux plugin claims to have found " + controllers.length + " controllers"); } /** Returns a list of all controllers available to this environment, diff --git a/plugins/linux/src/native/JoystickDevice.cpp b/plugins/linux/src/native/JoystickDevice.cpp index 59d69eb..20be098 100644 --- a/plugins/linux/src/native/JoystickDevice.cpp +++ b/plugins/linux/src/native/JoystickDevice.cpp @@ -42,7 +42,7 @@ JoystickDevice::JoystickDevice(char *deviceFileName) { int i; LOG_TRACE("Trying to open %s\n", deviceFileName); - fd = open(deviceFileName, O_RDWR | O_NONBLOCK); + fd = open(deviceFileName, O_RDONLY | O_NONBLOCK); /*if(fd<0) { char errorMessage[512]; sprintf(errorMessage, "Error opening device %s\n", deviceFileName); -- cgit v1.2.3