X-Git-Url: http://code.vuplus.com/gitweb/?p=vuplus_dvbapp;a=blobdiff_plain;f=lib%2Fdriver%2Frcinput.cpp;h=f30ba8cbe7f85010d76d8f25df36f276988181fd;hp=e593087d7cfd158480f7724040cfa9e590cd4452;hb=0a62b65175152c42976d4cb04fb7026d9f910915;hpb=738bb44f393edf2a58eef973f7f5a01c2e2bbaa3 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