git.cweiske.de
/
enigma2.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
982a15e
)
simplify case-insensitive substring search
author
Andreas Oberritter
<obi@opendreambox.org>
Tue, 29 Sep 2009 23:23:42 +0000
(
01:23
+0200)
committer
Andreas Oberritter
<obi@opendreambox.org>
Mon, 26 Apr 2010 10:28:24 +0000
(12:28 +0200)
lib/driver/rcinput.cpp
patch
|
blob
|
history
diff --git
a/lib/driver/rcinput.cpp
b/lib/driver/rcinput.cpp
index 2bfeefa1992e53c2a07d55b346f30f91670e15c1..f30ba8cbe7f85010d76d8f25df36f276988181fd 100644
(file)
--- 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)
{
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 ");
}
setExclusive(true);
eDebug("Input device \"%s\" is %sa keyboard.", id.c_str(), iskeyboard ? "" : "not ");
}