X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/87bfe5dfced0fb7a4e9839fdafa898261a39c86c..9fd2c54ef3bf35619766b304b3945695eb9271a6:/lib/driver/rc.cpp diff --git a/lib/driver/rc.cpp b/lib/driver/rc.cpp index d4664896..c7acd113 100644 --- a/lib/driver/rc.cpp +++ b/lib/driver/rc.cpp @@ -8,7 +8,6 @@ #include #include -#include #include /* @@ -80,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); } @@ -90,8 +89,6 @@ eRCShortDriver::~eRCShortDriver() { if (handle>=0) close(handle); - if (sn) - delete sn; } void eRCInputEventDriver::keyPressed(int) @@ -103,7 +100,7 @@ void eRCInputEventDriver::keyPressed(int) break; if (enabled && !input->islocked()) for (std::list::iterator i(listeners.begin()); i!=listeners.end(); ++i) - (*i)->handleCode((int)&ev); + (*i)->handleCode((long)&ev); } } @@ -116,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); } @@ -134,8 +131,6 @@ eRCInputEventDriver::~eRCInputEventDriver() { if (handle>=0) close(handle); - if (sn) - delete sn; } eRCConfig::eRCConfig() @@ -158,15 +153,10 @@ void eRCConfig::reload() { rdelay=500; rrate=100; - if ( eConfig::getInstance()->getKey("/ezap/rc/repeatRate", rrate) ) - save(); - eConfig::getInstance()->getKey("/ezap/rc/repeatDelay", rdelay); } void eRCConfig::save() { - eConfig::getInstance()->setKey("/ezap/rc/repeatRate", rrate); - eConfig::getInstance()->setKey("/ezap/rc/repeatDelay", rdelay); } eRCInput *eRCInput::instance; @@ -177,7 +167,7 @@ eRCInput::eRCInput() instance=this; handle = -1; locked = 0; - keyboardMode = kmAll; + keyboardMode = kmNone; } eRCInput::~eRCInput()