From 74aabc8381e9faa221b87b7d2280238d30f2e9c5 Mon Sep 17 00:00:00 2001 From: Marianne Arnold Date: Mon, 25 Jun 2007 20:54:11 +0000 Subject: Make the '%mh' wps tag (to indicate keylock status) available on the Archos targets as well. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13716 a1c6a512-1295-4272-9138-f99709370657 --- apps/gui/gwps-common.c | 7 +++++-- apps/gui/gwps.h | 3 +-- apps/gui/wps_parser.c | 3 +-- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/apps/gui/gwps-common.c b/apps/gui/gwps-common.c index a66c1aa4b5..fe7e1ed979 100644 --- a/apps/gui/gwps-common.c +++ b/apps/gui/gwps-common.c @@ -1293,13 +1293,16 @@ static char *get_token_value(struct gui_wps *gwps, } #endif -#ifdef HAS_BUTTON_HOLD case WPS_TOKEN_MAIN_HOLD: +#ifdef HAS_BUTTON_HOLD if (button_hold()) +#else + if (is_keys_locked()) +#endif /*hold switch or softlock*/ return "h"; else return NULL; -#endif + #ifdef HAS_REMOTE_BUTTON_HOLD case WPS_TOKEN_REMOTE_HOLD: if (remote_button_hold()) diff --git a/apps/gui/gwps.h b/apps/gui/gwps.h index cafcf135bc..ab8258147e 100644 --- a/apps/gui/gwps.h +++ b/apps/gui/gwps.h @@ -203,9 +203,8 @@ enum wps_token_type { WPS_TOKEN_REPEAT_MODE, WPS_TOKEN_PLAYBACK_STATUS, -#ifdef HAS_BUTTON_HOLD WPS_TOKEN_MAIN_HOLD, -#endif + #ifdef HAS_REMOTE_BUTTON_HOLD WPS_TOKEN_REMOTE_HOLD, #endif diff --git a/apps/gui/wps_parser.c b/apps/gui/wps_parser.c index cb930bc74c..43ea516b53 100644 --- a/apps/gui/wps_parser.c +++ b/apps/gui/wps_parser.c @@ -227,9 +227,8 @@ static const struct wps_tag all_tags[] = { { WPS_TOKEN_VLED_HDD, "lh", WPS_REFRESH_DYNAMIC, NULL }, #endif -#ifdef HAS_BUTTON_HOLD { WPS_TOKEN_MAIN_HOLD, "mh", WPS_REFRESH_DYNAMIC, NULL }, -#endif + #ifdef HAS_REMOTE_BUTTON_HOLD { WPS_TOKEN_REMOTE_HOLD, "mr", WPS_REFRESH_DYNAMIC, NULL }, #endif -- cgit v1.2.3