improved autorepeat behavior in menus

git-svn-id: file:///home/notaz/opt/svn/PicoDrive@499 be3aeb3a-fb24-0410-a615-afba39da0efa
This commit is contained in:
notaz 2008-06-26 20:27:33 +00:00
parent 52250671ae
commit 385760631f
3 changed files with 18 additions and 11 deletions

View file

@ -46,7 +46,7 @@ static int inp_prevjoy = 0;
static unsigned long wait_for_input(unsigned long interesting)
{
unsigned long ret;
static int repeats = 0, wait = 6;
static int repeats = 0, wait = 20;
int release = 0, i;
if (repeats == 2) wait = 3;
@ -65,8 +65,10 @@ static unsigned long wait_for_input(unsigned long interesting)
if (release || ret != inp_prev) {
repeats = 0;
wait = 6;
wait = 20;
}
if (wait > 6 && (ret&(GP2X_UP|GP2X_LEFT|GP2X_DOWN|GP2X_RIGHT)))
wait = 6;
inp_prev = ret;
inp_prevjoy = 0;