summaryrefslogtreecommitdiff
path: root/apps/gui/skin_engine/skin_tokens.c
diff options
context:
space:
mode:
authorJonathan Gordon <rockbox@jdgordon.info>2010-06-15 06:55:18 +0000
committerJonathan Gordon <rockbox@jdgordon.info>2010-06-15 06:55:18 +0000
commitf98ea7142ee4820d57c83c244515d6d5478f20dd (patch)
tree0f680524e604a1554e06d5c77124277da610182c /apps/gui/skin_engine/skin_tokens.c
parent2e320f66f4f3c831dcfd232b33da0e6ab6dd7dd0 (diff)
FS#11096 - fix the "last touch" tag from being true on boot
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26852 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/gui/skin_engine/skin_tokens.c')
-rw-r--r--apps/gui/skin_engine/skin_tokens.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/apps/gui/skin_engine/skin_tokens.c b/apps/gui/skin_engine/skin_tokens.c
index 39bf0d497e..b0a55ca13c 100644
--- a/apps/gui/skin_engine/skin_tokens.c
+++ b/apps/gui/skin_engine/skin_tokens.c
@@ -1040,11 +1040,15 @@ const char *get_token_value(struct gui_wps *gwps,
return NULL;
case WPS_TOKEN_LASTTOUCH:
+ {
#ifdef HAVE_TOUCHSCREEN
- if (TIME_BEFORE(current_tick, token->value.i * TIMEOUT_UNIT +
- touchscreen_last_touch()))
+ unsigned int last_touch = touchscreen_last_touch();
+ if (last_touch != 0xffff &&
+ TIME_BEFORE(current_tick, token->value.i * TIMEOUT_UNIT +
+ last_touch))
return "t";
#endif
+ }
return NULL;
case WPS_TOKEN_SETTING: