X-Git-Url: http://code.vuplus.com/gitweb/?a=blobdiff_plain;f=lib%2Fdriver%2Frcinput.cpp;h=f30ba8cbe7f85010d76d8f25df36f276988181fd;hb=4712fa7b44263f0e9517bb5a4b1729d922994572;hp=e593087d7cfd158480f7724040cfa9e590cd4452;hpb=9e205508ab4462cac81f7b85447c7ba907a59c99;p=vuplus_dvbapp diff --git a/lib/driver/rcinput.cpp b/lib/driver/rcinput.cpp index e593087..f30ba8c 100644 --- a/lib/driver/rcinput.cpp +++ b/lib/driver/rcinput.cpp @@ -73,23 +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) { - driver->setExclusive(!iskeyboard && b); + if (!iskeyboard) + driver->setExclusive(b); } const char *eRCDeviceInputDev::getDescription() const