diff options
author | Thomas Martitz <kugel@rockbox.org> | 2014-01-12 21:29:55 +0100 |
---|---|---|
committer | Thomas Martitz <kugel@rockbox.org> | 2014-01-12 21:29:55 +0100 |
commit | eafc7012daedfb5a38ef4db4a9bc76d12992323b (patch) | |
tree | c0afca900b41249ee4c1203acb7582372790089f | |
parent | 09e655f89df9cea14838136a6072b0b2d8ee2d48 (diff) | |
download | rockbox-eafc7012daedfb5a38ef4db4a9bc76d12992323b.tar.gz rockbox-eafc7012daedfb5a38ef4db4a9bc76d12992323b.zip |
scroll_engine: Fix FS#12894: Text scrolling stops working after a few seconds/minutes
Since commit 706b920 a timeout of TIMEOUT_BLOCK (-1) will cause
queue_event_w_tmo() block indefinitely (previously it behaved as
TIMEOUT_NOBLOCK). scroll_process_message() can be called with negative
timeouts, with luck also -1.
To fix this convert all negative timeouts to TIMEOUT_NOBLOCK explicitely.
Change-Id: I1fc20d93acbba50d713c8364f635365930b38cbf
-rw-r--r-- | firmware/scroll_engine.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/firmware/scroll_engine.c b/firmware/scroll_engine.c index d1bc2976a1..cb0051dac7 100644 --- a/firmware/scroll_engine.c +++ b/firmware/scroll_engine.c | |||
@@ -79,6 +79,10 @@ static bool scroll_process_message(int delay) | |||
79 | { | 79 | { |
80 | struct queue_event ev; | 80 | struct queue_event ev; |
81 | 81 | ||
82 | /* just poll once for negative delays */ | ||
83 | if (delay < 0) | ||
84 | delay = TIMEOUT_NOBLOCK; | ||
85 | |||
82 | do | 86 | do |
83 | { | 87 | { |
84 | long tick = current_tick; | 88 | long tick = current_tick; |
@@ -199,4 +203,3 @@ void scroll_init(void) | |||
199 | IF_PRIO(, PRIORITY_USER_INTERFACE) | 203 | IF_PRIO(, PRIORITY_USER_INTERFACE) |
200 | IF_COP(, CPU)); | 204 | IF_COP(, CPU)); |
201 | } | 205 | } |
202 | |||