healing the X11 simulator (button_get_w_tmo wise), please bear with me as I

haven't tested this fix but it compiles nicely ;-)


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@1579 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Daniel Stenberg 2002-08-07 08:43:55 +00:00
parent a93801da31
commit a398aa49dd

View file

@ -134,6 +134,25 @@ static int get_raw_button (void)
}
}
/*
* Timeout after TICKS unless a key is pressed.
*/
int button_get_w_tmo(int ticks)
{
int bits;
int i=0;
for(i=0; i< ticks; i++) {
bits = get_raw_button();
if(!bits)
x11_sleep(1);
else
break;
};
return bits;
}
/*
* Get the currently pressed button.
* Returns one of BUTTON_xxx codes, with possibly a modifier bit set.