From 1d356863e29fdf51131d7a6d05154be3f1d14565 Mon Sep 17 00:00:00 2001 From: Stefan Seyfried Date: Mon, 19 Mar 2012 19:37:53 +0100 Subject: [PATCH] neutrino: set input device repeat on spark/tripledragon Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/9221807a7cbd550e3fe735ac8a598a3a7e4d0408 Author: Stefan Seyfried Date: 2012-03-19 (Mon, 19 Mar 2012) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/system/setting_helpers.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/system/setting_helpers.cpp b/src/system/setting_helpers.cpp index 14eb437de..fb5cb0ff9 100644 --- a/src/system/setting_helpers.cpp +++ b/src/system/setting_helpers.cpp @@ -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; }