servicemp3.cpp: more simple/flexible streaming detection
[enigma2.git] / lib / driver / rcinput.cpp
index e593087d7cfd158480f7724040cfa9e590cd4452..f30ba8cbe7f85010d76d8f25df36f276988181fd 100644 (file)
@@ -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