diff options
author | Rob Purchase <shotofadds@rockbox.org> | 2009-11-23 23:30:55 +0000 |
---|---|---|
committer | Rob Purchase <shotofadds@rockbox.org> | 2009-11-23 23:30:55 +0000 |
commit | 0b30eb79b1fa7586225bff539b19c65e447d70ee (patch) | |
tree | bee58c101503a91fa3035b112f4b4ab629b92e0d /firmware | |
parent | 9b398752eb913e97655e2ff93af3595a847e36cd (diff) |
Fix FS#10362 (flickering backlight when removing hold) by preventing multiple SYS_TIMEOUT events being posted the backlight thread.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23730 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware')
-rw-r--r-- | firmware/backlight.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/firmware/backlight.c b/firmware/backlight.c index 8eded957f7..27bc8a453f 100644 --- a/firmware/backlight.c +++ b/firmware/backlight.c @@ -481,10 +481,11 @@ static void backlight_update_state(void) if (UNLIKELY(timeout < 0)) { do_backlight_off(); -#if (CONFIG_BACKLIGHT_FADING == BACKLIGHT_FADING_SW_SETTING) \ +#if (CONFIG_BACKLIGHT_FADING == BACKLIGHT_FADING_SW_SETTING) \ || (CONFIG_BACKLIGHT_FADING == BACKLIGHT_FADING_SW_HW_REG) - /* necessary step to issue fading down when the setting is selected */ - queue_post(&backlight_queue, SYS_TIMEOUT, 0); + /* necessary step to issue fading down when the setting is selected */ + if (queue_empty(&backlight_queue)) + queue_post(&backlight_queue, SYS_TIMEOUT, 0); #endif } else |