make dm8000 blink pattern a bit nicer
[enigma2.git] / lib / driver / rc.cpp
index 1a2cc1d8f3754f489d529cae1800eec307281093..c7acd1138a1b35bc10c937e72df8e0d53453ff7d 100644 (file)
@@ -79,7 +79,7 @@ eRCShortDriver::eRCShortDriver(const char *filename): eRCDriver(eRCInput::getIns
                sn=0;
        } else
        {
-               sn=new eSocketNotifier(eApp, handle, eSocketNotifier::Read);
+               sn=eSocketNotifier::create(eApp, handle, eSocketNotifier::Read);
                CONNECT(sn->activated, eRCShortDriver::keyPressed);
                eRCInput::getInstance()->setFile(handle);
        }
@@ -89,8 +89,6 @@ eRCShortDriver::~eRCShortDriver()
 {
        if (handle>=0)
                close(handle);
-       if (sn)
-               delete sn;
 }
 
 void eRCInputEventDriver::keyPressed(int)
@@ -102,7 +100,7 @@ void eRCInputEventDriver::keyPressed(int)
                        break;
                if (enabled && !input->islocked())
                        for (std::list<eRCDevice*>::iterator i(listeners.begin()); i!=listeners.end(); ++i)
-                               (*i)->handleCode((int)&ev);
+                               (*i)->handleCode((long)&ev);
        }
 }
 
@@ -115,7 +113,7 @@ eRCInputEventDriver::eRCInputEventDriver(const char *filename): eRCDriver(eRCInp
                sn=0;
        } else
        {
-               sn=new eSocketNotifier(eApp, handle, eSocketNotifier::Read);
+               sn=eSocketNotifier::create(eApp, handle, eSocketNotifier::Read);
                CONNECT(sn->activated, eRCInputEventDriver::keyPressed);
                eRCInput::getInstance()->setFile(handle);
        }
@@ -133,8 +131,6 @@ eRCInputEventDriver::~eRCInputEventDriver()
 {
        if (handle>=0)
                close(handle);
-       if (sn)
-               delete sn;
 }
 
 eRCConfig::eRCConfig()
@@ -171,7 +167,7 @@ eRCInput::eRCInput()
        instance=this;
        handle = -1;
        locked = 0;
-       keyboardMode = kmAll;
+       keyboardMode = kmNone;
 }
 
 eRCInput::~eRCInput()