mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-27 15:32:52 +02:00
rcinput: add hack to set rcdelay after device hotplug
this fixes e.g. wrong repeat settings after lircd restart
Origin commit data
------------------
Branch: ni/coolstream
Commit: dc9a9f90a4
Author: Stefan Seyfried <seife@tuxbox-git.slipkontur.de>
Date: 2017-09-25 (Mon, 25 Sep 2017)
------------------
This commit was generated by Migit
This commit is contained in:
committed by
vanhofen
parent
42f8b9badb
commit
4975889e5d
@@ -75,6 +75,9 @@ static bool saved_orig_termio = false;
|
||||
static bool input_stopped = false;
|
||||
static struct timespec devinput_mtime = { 0, 0 };
|
||||
|
||||
static unsigned int _start_ms = 0;
|
||||
static unsigned int _repeat_ms = 0;
|
||||
|
||||
#ifdef RCDEBUG
|
||||
#define d_printf printf
|
||||
#else
|
||||
@@ -243,6 +246,7 @@ void CRCInput::open(bool recheck)
|
||||
indev.push_back(id);
|
||||
}
|
||||
closedir(dir);
|
||||
setKeyRepeatDelay(0, 0);
|
||||
id.path = "/tmp/neutrino.input";
|
||||
if (! checkpath(id)) {
|
||||
id.fd = ::open(id.path.c_str(), O_RDWR|O_NONBLOCK|O_CLOEXEC);
|
||||
@@ -1737,6 +1741,13 @@ int CRCInput::translate(int code)
|
||||
|
||||
void CRCInput::setKeyRepeatDelay(unsigned int start_ms, unsigned int repeat_ms)
|
||||
{
|
||||
if (start_ms == 0 && repeat_ms == 0) {
|
||||
start_ms = _start_ms;
|
||||
repeat_ms = _repeat_ms;
|
||||
} else {
|
||||
_start_ms = start_ms;
|
||||
_repeat_ms = repeat_ms;
|
||||
}
|
||||
for (std::vector<in_dev>::iterator it = indev.begin(); it != indev.end(); ++it) {
|
||||
int fd = (*it).fd;
|
||||
std::string path = (*it).path;
|
||||
|
Reference in New Issue
Block a user