Fixes for js devices that are read only

This commit is contained in:
endolf 2005-11-03 22:00:11 +00:00
parent f95cb1ce41
commit 9a920ade6d
2 changed files with 3 additions and 1 deletions

View file

@ -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,

View file

@ -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);