#include <lib/base/init.h>
#include <lib/base/init_num.h>
-#include <lib/base/econfig.h>
#include <lib/base/eerror.h>
/*
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);
}
{
if (handle>=0)
close(handle);
- if (sn)
- delete sn;
}
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);
}
}
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);
}
{
if (handle>=0)
close(handle);
- if (sn)
- delete sn;
}
eRCConfig::eRCConfig()
{
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;