1
0
Fork 0
forked from len0rd/rockbox

Fixed poll interval handling

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@909 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Linus Nielsen Feltzing 2002-06-07 13:00:33 +00:00
parent df203f3997
commit 16ff7be475

View file

@ -28,9 +28,9 @@
static struct event_queue button_queue; static struct event_queue button_queue;
#define POLL_FREQUENCY HZ/10 #define POLL_FREQUENCY HZ/20
#define REPEAT_START 3 #define REPEAT_START 6
#define REPEAT_INTERVAL 2 #define REPEAT_INTERVAL 4
static int button_read(void); static int button_read(void);
@ -42,7 +42,7 @@ static void button_tick(void)
static bool repeat=false; static bool repeat=false;
/* only poll every X ticks */ /* only poll every X ticks */
if ( tick++ > POLL_FREQUENCY ) { if ( ++tick >= POLL_FREQUENCY ) {
bool post = false; bool post = false;
int btn = button_read(); int btn = button_read();