summaryrefslogtreecommitdiff
path: root/uisimulator
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2002-08-07 08:43:55 +0000
committerDaniel Stenberg <daniel@haxx.se>2002-08-07 08:43:55 +0000
commita398aa49ddad0f53e305d87336f3015667fd0636 (patch)
treed3abd904bdc16cf59c1b63e043770f20e1ae8897 /uisimulator
parenta93801da31e5346bcee816fe31560b77a6796ace (diff)
downloadrockbox-a398aa49ddad0f53e305d87336f3015667fd0636.tar.gz
rockbox-a398aa49ddad0f53e305d87336f3015667fd0636.zip
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
Diffstat (limited to 'uisimulator')
-rw-r--r--uisimulator/x11/button-x11.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/uisimulator/x11/button-x11.c b/uisimulator/x11/button-x11.c
index 1d27eff134..734272c6c4 100644
--- a/uisimulator/x11/button-x11.c
+++ b/uisimulator/x11/button-x11.c
@@ -135,6 +135,25 @@ static int get_raw_button (void)
135} 135}
136 136
137/* 137/*
138 * Timeout after TICKS unless a key is pressed.
139 */
140int button_get_w_tmo(int ticks)
141{
142 int bits;
143 int i=0;
144
145 for(i=0; i< ticks; i++) {
146 bits = get_raw_button();
147 if(!bits)
148 x11_sleep(1);
149 else
150 break;
151 };
152
153 return bits;
154}
155
156/*
138 * Get the currently pressed button. 157 * Get the currently pressed button.
139 * Returns one of BUTTON_xxx codes, with possibly a modifier bit set. 158 * Returns one of BUTTON_xxx codes, with possibly a modifier bit set.
140 * No modifier bits are set when the button is first pressed. 159 * No modifier bits are set when the button is first pressed.