mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-27 23:42:58 +02:00
keybind_setup: use rcinput->setKeyRepeatDelay()
This commit is contained in:
@@ -573,28 +573,7 @@ bool CKeybindSetup::changeNotify(const neutrino_locale_t OptionName, void * /* d
|
||||
|
||||
g_RCInput->repeat_block = fdelay * 1000;
|
||||
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 input_event ie;
|
||||
memset(&ie, 0, sizeof(ie));
|
||||
ie.type = EV_REP;
|
||||
/* increase by 10 ms to trick the repeat checker code in the
|
||||
* rcinput loop into accepting the key event... */
|
||||
ie.value = fdelay + 10;
|
||||
ie.code = REP_DELAY;
|
||||
if (write(fd, &ie, sizeof(ie)) == -1)
|
||||
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
|
||||
g_RCInput->setKeyRepeatDelay(fdelay, xdelay);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
Reference in New Issue
Block a user