aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorendolf <[email protected]>2005-11-03 22:00:11 +0000
committerendolf <[email protected]>2005-11-03 22:00:11 +0000
commitcca9405b8dde9ba06a6d331447c39d156f6a94f9 (patch)
treee53cb70f19a3fb24d4afe9b687e090b03ad10348 /plugins
parentb46e6aebe45b6cf9b664ac27d3375c93521a3a35 (diff)
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
Diffstat (limited to 'plugins')
-rw-r--r--plugins/linux/src/java/net/java/games/input/LinuxEnvironmentPlugin.java2
-rw-r--r--plugins/linux/src/native/JoystickDevice.cpp2
2 files changed, 3 insertions, 1 deletions
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);