X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/3458b59694ee3659c2afdd3e7e48a2e087f1102f..932f1ec948f517d2cf739cba5ac564fcac618aa9:/lib/driver/rcinput.cpp diff --git a/lib/driver/rcinput.cpp b/lib/driver/rcinput.cpp index d10d94f3..f30ba8cb 100644 --- a/lib/driver/rcinput.cpp +++ b/lib/driver/rcinput.cpp @@ -73,18 +73,16 @@ 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 "); +} +void eRCDeviceInputDev::setExclusive(bool b) +{ + if (!iskeyboard) + driver->setExclusive(b); } const char *eRCDeviceInputDev::getDescription() const