mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-28 16:01:10 +02:00
neutrino: fix input device repeat setting for pre 2.6.17 kernels
Origin commit data
------------------
Branch: ni/coolstream
Commit: 146c46da8e
Author: Stefan Seyfried <seife@tuxbox-git.slipkontur.de>
Date: 2012-03-25 (Sun, 25 Mar 2012)
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -155,7 +155,7 @@ void CRCInput::open()
|
|||||||
|
|
||||||
for (int i = 0; i < NUMBER_OF_EVENT_DEVICES; i++)
|
for (int i = 0; i < NUMBER_OF_EVENT_DEVICES; i++)
|
||||||
{
|
{
|
||||||
if ((fd_rc[i] = ::open(RC_EVENT_DEVICE[i], O_RDONLY)) == -1)
|
if ((fd_rc[i] = ::open(RC_EVENT_DEVICE[i], O_RDWR)) == -1)
|
||||||
perror(RC_EVENT_DEVICE[i]);
|
perror(RC_EVENT_DEVICE[i]);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@@ -461,17 +461,19 @@ bool CKeySetupNotifier::changeNotify(const neutrino_locale_t, void *)
|
|||||||
ioctl(fd, IOC_IR_SET_X_DELAY, xdelay);
|
ioctl(fd, IOC_IR_SET_X_DELAY, xdelay);
|
||||||
#else
|
#else
|
||||||
/* if we have a good input device, we don't need the private ioctl above */
|
/* if we have a good input device, we don't need the private ioctl above */
|
||||||
struct my_repeat {
|
struct input_event ie;
|
||||||
unsigned int delay; /* in ms */
|
ie.type = EV_REP;
|
||||||
unsigned int period; /* in ms */
|
|
||||||
};
|
|
||||||
struct my_repeat n;
|
|
||||||
/* increase by 10 ms to trick the repeat checker code in the
|
/* increase by 10 ms to trick the repeat checker code in the
|
||||||
* rcinput loop into accepting the key event... */
|
* rcinput loop into accepting the key event... */
|
||||||
n.delay = fdelay + 10;
|
ie.value = fdelay + 10;
|
||||||
n.period = xdelay + 10;
|
ie.code = REP_DELAY;
|
||||||
if (ioctl(fd, EVIOCSREP, &n))
|
if (write(fd, &ie, sizeof(ie)) == -1)
|
||||||
perror("CKeySetupNotifier::changeNotify EVIOCSREP");
|
perror("CKeySetupNotifier::changeNotify REP_DELAY");
|
||||||
|
|
||||||
|
ie.value = xdelay + 10;
|
||||||
|
ie.code = REP_PERIOD;
|
||||||
|
if (write(fd, &ie, sizeof(ie)) == -1)
|
||||||
|
perror("CKeySetupNotifier::changeNotify REP_PERIOD");
|
||||||
#endif
|
#endif
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user