mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-08 20:55:17 -05:00
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:
parent
a93801da31
commit
a398aa49dd
1 changed files with 19 additions and 0 deletions
|
|
@ -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.
|
* Get the currently pressed button.
|
||||||
* Returns one of BUTTON_xxx codes, with possibly a modifier bit set.
|
* Returns one of BUTTON_xxx codes, with possibly a modifier bit set.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue