diff options
-rw-r--r-- | apps/gui/skin_engine/skin_parser.c | 4 | ||||
-rw-r--r-- | apps/gui/skin_engine/skin_tokens.c | 9 |
2 files changed, 5 insertions, 8 deletions
diff --git a/apps/gui/skin_engine/skin_parser.c b/apps/gui/skin_engine/skin_parser.c index ed7771529e..5048b27f8e 100644 --- a/apps/gui/skin_engine/skin_parser.c +++ b/apps/gui/skin_engine/skin_parser.c @@ -495,9 +495,7 @@ static int parse_timeout_tag(struct skin_element *element, } else val = element->params[0].data.number; - token->value.i = val; - if (token->type == SKIN_TOKEN_SUBLINE_TIMEOUT) - curr_line->timeout = val * TIMEOUT_UNIT; + token->value.i = val * TIMEOUT_UNIT; return 0; } diff --git a/apps/gui/skin_engine/skin_tokens.c b/apps/gui/skin_engine/skin_tokens.c index a05327907d..1d617fdfa6 100644 --- a/apps/gui/skin_engine/skin_tokens.c +++ b/apps/gui/skin_engine/skin_tokens.c @@ -293,14 +293,14 @@ const char *get_id3_token(struct wps_token *token, struct mp3entry *id3, case SKIN_TOKEN_TRACK_STARTING: { - unsigned long time = token->value.i * 1000; + unsigned long time = token->value.i * (HZ/TIMEOUT_UNIT); if (elapsed < time) return "starting"; } return NULL; case SKIN_TOKEN_TRACK_ENDING: { - unsigned long time = token->value.i * 1000; + unsigned long time = token->value.i * (HZ/TIMEOUT_UNIT); if (length - elapsed < time) return "ending"; } @@ -1066,7 +1066,7 @@ const char *get_token_value(struct gui_wps *gwps, case SKIN_TOKEN_BUTTON_VOLUME: if (global_status.last_volume_change && TIME_BEFORE(current_tick, global_status.last_volume_change + - token->value.i * TIMEOUT_UNIT)) + token->value.i)) return "v"; return NULL; @@ -1075,8 +1075,7 @@ const char *get_token_value(struct gui_wps *gwps, #ifdef HAVE_TOUCHSCREEN unsigned int last_touch = touchscreen_last_touch(); if (last_touch != 0xffff && - TIME_BEFORE(current_tick, token->value.i * TIMEOUT_UNIT + - last_touch)) + TIME_BEFORE(current_tick, token->value.i) + last_touch)) return "t"; #endif } |