neutrino: set input device repeat on spark/tripledragon

Origin commit data
------------------
Branch: ni/coolstream
Commit: 9221807a7c
Author: Stefan Seyfried <seife@tuxbox-git.slipkontur.de>
Date: 2012-03-19 (Mon, 19 Mar 2012)


------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
Stefan Seyfried
2012-03-19 19:37:53 +01:00
parent 816790f15c
commit 1d356863e2

View File

@@ -456,8 +456,23 @@ bool CKeySetupNotifier::changeNotify(const neutrino_locale_t, void *)
g_RCInput->repeat_block_generic = xdelay * 1000;
int fd = g_RCInput->getFileHandle();
#ifdef HAVE_COOL_HARDWARE
ioctl(fd, IOC_IR_SET_F_DELAY, fdelay);
ioctl(fd, IOC_IR_SET_X_DELAY, xdelay);
#else
/* if we have a good input device, we don't need the private ioctl above */
struct my_repeat {
unsigned int delay; /* in ms */
unsigned int period; /* in ms */
};
struct my_repeat n;
/* increase by 10 ms to trick the repeat checker code in the
* rcinput loop into accepting the key event... */
n.delay = fdelay + 10;
n.period = xdelay + 10;
if (ioctl(fd, EVIOCSREP, &n))
perror("CKeySetupNotifier::changeNotify EVIOCSREP");
#endif
return false;
}