X-Git-Url: http://code.vuplus.com/gitweb/?a=blobdiff_plain;f=lib%2Fdriver%2Frcinput.cpp;h=f30ba8cbe7f85010d76d8f25df36f276988181fd;hb=8e3b33ff38bd7c006351b1921ac8f3d1606de39f;hp=e593087d7cfd158480f7724040cfa9e590cd4452;hpb=3bc4feea6206761d48e7ead73dfd32721bf8e259;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