diff options
author | endolf <[email protected]> | 2004-04-21 09:48:55 +0000 |
---|---|---|
committer | endolf <[email protected]> | 2004-04-21 09:48:55 +0000 |
commit | 4e7cd82fba61afff752a022d70c24627b248addf (patch) | |
tree | e4f774c498c73295eec0f55210b23374a1a2b231 /plugins/linux/src/native/EventDevice.cpp | |
parent | c641e31461650f8c7886de5e859f3f0582a29579 (diff) |
fixes for issues 25 and 26
Sigsgv with logitec USB keyboard with volume controls and mouse wheel
when valid event device list in /dev/input/event* has invalid devices in the middle of the sequence, a sigsegv is seen
git-svn-id: file:///home/sven/projects/JOGL/git-svn/svn-server-sync/jinput/trunk@76 e343933a-64c8-49c5-92b1-88f2ce3e89e8
Diffstat (limited to 'plugins/linux/src/native/EventDevice.cpp')
-rw-r--r-- | plugins/linux/src/native/EventDevice.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/plugins/linux/src/native/EventDevice.cpp b/plugins/linux/src/native/EventDevice.cpp index 068a023..668b6c4 100644 --- a/plugins/linux/src/native/EventDevice.cpp +++ b/plugins/linux/src/native/EventDevice.cpp @@ -34,6 +34,8 @@ #include <malloc.h> #include <errno.h> +#include "logger.h" + EventDevice::EventDevice(char *deviceFileName) { char tempName[Device::MAX_NAME_LENGTH-1] = "Unknown"; int i; @@ -57,6 +59,8 @@ EventDevice::EventDevice(char *deviceFileName) { name = (char *)malloc(namelength+1); strncpy(name,tempName, namelength+1); + LOG_TRACE("Device name for device file %s is %s\n", deviceFileName, name); + uint8_t evtype_bitmask[EV_MAX/8 + 1]; memset(evtype_bitmask, 0, sizeof(evtype_bitmask)); @@ -213,6 +217,7 @@ int EventDevice::getNumberButtons(){ } const char *EventDevice::getName(){ + LOG_TRACE("EventDevice::getName()\n"); return name; } @@ -336,7 +341,7 @@ int EventDevice::poll(){ // reveiced for things like numlock led change break; default: - fprintf(stderr, "Received event of type 0x%02X from %s, which I wasn't expecting, please report it to [email protected]\n", events[i].type, name); + fprintf(stderr, "Received event of type 0x%02X from %s, which I wasn't expecting, please report it to jinput forum at www.javagaming.org\n", events[i].type, name); } } return dataChanged; |