diff options
author | endolf <[email protected]> | 2003-10-04 12:48:51 +0000 |
---|---|---|
committer | endolf <[email protected]> | 2003-10-04 12:48:51 +0000 |
commit | f73d0b8719fe82e2e362685ae8c8451fa48572dd (patch) | |
tree | a399ccf435e007be0331a92df118307c55d72189 /plugins/linux/src/native/joystickInterface.cpp | |
parent | e9fb8f194a4e54e067bee7850173c47285836b39 (diff) |
Fix and updated error messages for issue 20
git-svn-id: file:///home/sven/projects/JOGL/git-svn/svn-server-sync/jinput/trunk@53 e343933a-64c8-49c5-92b1-88f2ce3e89e8
Diffstat (limited to 'plugins/linux/src/native/joystickInterface.cpp')
-rw-r--r-- | plugins/linux/src/native/joystickInterface.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/plugins/linux/src/native/joystickInterface.cpp b/plugins/linux/src/native/joystickInterface.cpp index 2bcc8bc..bfa4231 100644 --- a/plugins/linux/src/native/joystickInterface.cpp +++ b/plugins/linux/src/native/joystickInterface.cpp @@ -102,10 +102,17 @@ int jsInit() { } } + int highDeviceCountNumber = i; + int jsTempDeviceCount = 0; // Now we know for certain which devices are open, we can take notes jsDeviceList = (Device **)malloc(jsNumDevices * sizeof(Device *)); for(i=0;i<jsNumDevices;i++) { - jsDeviceList[i] = tempDeviceList[i]; + while(tempDeviceList[jsTempDeviceCount] == NULL) { + jsTempDeviceCount++; + } + jsDeviceList[i] = tempDeviceList[jsTempDeviceCount]; + //printf("Copied joystick %d to %d\n", jsTempDeviceCount, i); + jsTempDeviceCount++; } jsInited=1; |