diff options
author | Jonathan Gordon <rockbox@jdgordon.info> | 2009-01-03 13:27:19 +0000 |
---|---|---|
committer | Jonathan Gordon <rockbox@jdgordon.info> | 2009-01-03 13:27:19 +0000 |
commit | 4b472de39b30c079ff846aec83d2da33cc0adcc5 (patch) | |
tree | f2435c9307c6aa495f4dc34c098290ddad3f97c3 /apps/plugins/battery_bench.c | |
parent | 3681ff197d3cf5393df3d56d7b6f7b39af0fc47f (diff) | |
download | rockbox-4b472de39b30c079ff846aec83d2da33cc0adcc5.tar.gz rockbox-4b472de39b30c079ff846aec83d2da33cc0adcc5.zip |
a few more button/statusbar fixes...
* hopefully fix the last of the plugins which dont handle the enw SYS event.
* fix FS#9750 - WPS's which dont specify (or force the wps on) wernt showing the statusbar at all
* lamp, battery_bench, *_flash button handling fixes
* plugins using the core menu code will again show the statusbar
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19656 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/battery_bench.c')
-rw-r--r-- | apps/plugins/battery_bench.c | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/apps/plugins/battery_bench.c b/apps/plugins/battery_bench.c index 7c67cca937..6559f535af 100644 --- a/apps/plugins/battery_bench.c +++ b/apps/plugins/battery_bench.c | |||
@@ -224,6 +224,7 @@ static unsigned int buf_idx; | |||
224 | 224 | ||
225 | bool exit_tsr(bool reenter) | 225 | bool exit_tsr(bool reenter) |
226 | { | 226 | { |
227 | long button; | ||
227 | (void)reenter; | 228 | (void)reenter; |
228 | rb->lcd_clear_display(); | 229 | rb->lcd_clear_display(); |
229 | rb->lcd_puts_scroll(0, 0, "Batt.Bench is currently running."); | 230 | rb->lcd_puts_scroll(0, 0, "Batt.Bench is currently running."); |
@@ -233,15 +234,21 @@ bool exit_tsr(bool reenter) | |||
233 | #endif | 234 | #endif |
234 | rb->lcd_update(); | 235 | rb->lcd_update(); |
235 | 236 | ||
236 | if (rb->button_get(true) == BATTERY_OFF) | 237 | while (1) |
237 | { | 238 | { |
238 | rb->queue_post(&thread_q, EV_EXIT, 0); | 239 | button = rb->button_get(true); |
239 | rb->thread_wait(thread_id); | 240 | if (IS_SYSEVENT(button)) |
240 | /* remove the thread's queue from the broadcast list */ | 241 | continue; |
241 | rb->queue_delete(&thread_q); | 242 | if (button == BATTERY_OFF) |
242 | return true; | 243 | { |
244 | rb->queue_post(&thread_q, EV_EXIT, 0); | ||
245 | rb->thread_wait(thread_id); | ||
246 | /* remove the thread's queue from the broadcast list */ | ||
247 | rb->queue_delete(&thread_q); | ||
248 | return true; | ||
249 | } | ||
250 | else return false; | ||
243 | } | 251 | } |
244 | else return false; | ||
245 | } | 252 | } |
246 | 253 | ||
247 | #define BIT_CHARGER 0x1 | 254 | #define BIT_CHARGER 0x1 |