From df585ffaa388d85a5cfdd5fef0e2a2510939f1ca Mon Sep 17 00:00:00 2001 From: Neale Pickett Date: Tue, 2 Jul 2013 22:49:54 -0600 Subject: [PATCH] trying to fix key repeat bug --- main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.c b/main.c index 9544323..6e6ac4c 100644 --- a/main.c +++ b/main.c @@ -180,11 +180,11 @@ update_controller() int inc = 1; cur = nesprobe(); + pressed = (last_val ^ cur) & cur; if (last_val != cur) { last_change = jiffies; + last_val = cur; } - pressed = (last_val ^ cur) & cur; - last_val = cur; if ((pressed & BTN_A) && ((state != JAM) || (jam_clock == 0))) { state = JAM;