summaryrefslogtreecommitdiffstats
path: root/firmware/scroll_engine.c
diff options
context:
space:
mode:
authorThomas Martitz <kugel@rockbox.org>2014-01-12 21:29:55 +0100
committerThomas Martitz <kugel@rockbox.org>2014-01-12 21:29:55 +0100
commiteafc7012daedfb5a38ef4db4a9bc76d12992323b (patch)
treec0afca900b41249ee4c1203acb7582372790089f /firmware/scroll_engine.c
parent09e655f89df9cea14838136a6072b0b2d8ee2d48 (diff)
downloadrockbox-eafc7012daedfb5a38ef4db4a9bc76d12992323b.tar.gz
rockbox-eafc7012daedfb5a38ef4db4a9bc76d12992323b.tar.bz2
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
Diffstat (limited to 'firmware/scroll_engine.c')
-rw-r--r--firmware/scroll_engine.c5
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)
{
struct queue_event ev;
+ /* just poll once for negative delays */
+ if (delay < 0)
+ delay = TIMEOUT_NOBLOCK;
+
do
{
long tick = current_tick;
@@ -199,4 +203,3 @@ void scroll_init(void)
IF_PRIO(, PRIORITY_USER_INTERFACE)
IF_COP(, CPU));
}
-