aboutsummaryrefslogtreecommitdiff
path: root/lib/driver/rcinput.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/driver/rcinput.cpp')
-rw-r--r--lib/driver/rcinput.cpp12
1 files changed, 2 insertions, 10 deletions
diff --git a/lib/driver/rcinput.cpp b/lib/driver/rcinput.cpp
index 2bfeefa1..f30ba8cb 100644
--- a/lib/driver/rcinput.cpp
+++ b/lib/driver/rcinput.cpp
@@ -73,16 +73,8 @@ void eRCDeviceInputDev::handleCode(long rccode)
eRCDeviceInputDev::eRCDeviceInputDev(eRCInputEventDriver *driver)
:eRCDevice(driver->getDeviceName(), driver), iskeyboard(false)
{
- int len=id.length();
- int idx=0;
- while(idx <= len-8)
- {
- if (!strncasecmp(&id[idx++], "KEYBOARD", 8))
- {
- iskeyboard=true;
- break;
- }
- }
+ if (strcasestr(id.c_str(), "keyboard") != NULL)
+ iskeyboard = true;
setExclusive(true);
eDebug("Input device \"%s\" is %sa keyboard.", id.c_str(), iskeyboard ? "" : "not ");
}