forked from len0rd/rockbox
revert the previous commit to find a nice way to fix the yellow...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19111 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
76d2dd9c0e
commit
c41bd04722
5 changed files with 8 additions and 53 deletions
|
|
@ -1394,16 +1394,6 @@ static const char *get_token_value(struct gui_wps *gwps,
|
||||||
token->value.i))
|
token->value.i))
|
||||||
return "v";
|
return "v";
|
||||||
return NULL;
|
return NULL;
|
||||||
case WPS_TOKEN_VIEWMODE:
|
|
||||||
if (intval)
|
|
||||||
{
|
|
||||||
if (data->current_mode > limit)
|
|
||||||
data->current_mode = 1;
|
|
||||||
*intval = data->current_mode;
|
|
||||||
}
|
|
||||||
snprintf(buf, buf_size, "%d", data->current_mode);
|
|
||||||
return buf;
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -136,7 +136,7 @@ long gui_wps_show(void)
|
||||||
bool update_track = false;
|
bool update_track = false;
|
||||||
int i;
|
int i;
|
||||||
long last_left = 0, last_right = 0;
|
long last_left = 0, last_right = 0;
|
||||||
bool isremote = false;
|
|
||||||
wps_state_init();
|
wps_state_init();
|
||||||
|
|
||||||
#ifdef HAVE_LCD_CHARCELLS
|
#ifdef HAVE_LCD_CHARCELLS
|
||||||
|
|
@ -234,9 +234,6 @@ long gui_wps_show(void)
|
||||||
#else
|
#else
|
||||||
button = get_action(CONTEXT_WPS|ALLOW_SOFTLOCK,HZ/5);
|
button = get_action(CONTEXT_WPS|ALLOW_SOFTLOCK,HZ/5);
|
||||||
#endif
|
#endif
|
||||||
#if NB_SCREENS > 1
|
|
||||||
isremote = get_action_statuscode(NULL)&ACTION_REMOTE;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Exit if audio has stopped playing. This can happen if using the
|
/* Exit if audio has stopped playing. This can happen if using the
|
||||||
sleep timer with the charger plugged or if starting a recording
|
sleep timer with the charger plugged or if starting a recording
|
||||||
|
|
@ -295,23 +292,13 @@ long gui_wps_show(void)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ACTION_WPS_BROWSE:
|
case ACTION_WPS_BROWSE:
|
||||||
if (gui_wps[isremote?1:0].data->current_mode > -1)
|
|
||||||
{
|
|
||||||
/* will get set to 0 eventually again in wps_parser.c */
|
|
||||||
gui_wps[isremote?1:0].data->current_mode =
|
|
||||||
gui_wps[isremote?1:0].data->current_mode+1;
|
|
||||||
restore = true;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
#ifdef HAVE_LCD_CHARCELLS
|
#ifdef HAVE_LCD_CHARCELLS
|
||||||
status_set_record(false);
|
status_set_record(false);
|
||||||
status_set_audio(false);
|
status_set_audio(false);
|
||||||
#endif
|
#endif
|
||||||
FOR_NB_SCREENS(i)
|
FOR_NB_SCREENS(i)
|
||||||
gui_wps[i].display->stop_scroll();
|
gui_wps[i].display->stop_scroll();
|
||||||
return GO_TO_PREVIOUS_BROWSER;
|
return GO_TO_PREVIOUS_BROWSER;
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
/* play/pause */
|
/* play/pause */
|
||||||
|
|
|
||||||
|
|
@ -295,10 +295,7 @@ enum wps_token_type {
|
||||||
WPS_VIEWPORT_ENABLE,
|
WPS_VIEWPORT_ENABLE,
|
||||||
|
|
||||||
/* buttons */
|
/* buttons */
|
||||||
WPS_TOKEN_BUTTON_VOLUME,
|
WPS_TOKEN_BUTTON_VOLUME
|
||||||
|
|
||||||
WPS_TOKEN_VIEWMODE
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
struct wps_token {
|
struct wps_token {
|
||||||
|
|
@ -432,8 +429,6 @@ struct wps_data
|
||||||
|
|
||||||
/* tick the volume button was last pressed */
|
/* tick the volume button was last pressed */
|
||||||
unsigned int button_time_volume;
|
unsigned int button_time_volume;
|
||||||
/* the current mode (used with %mo tag), -1 means modes not being used */
|
|
||||||
char current_mode;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/* initial setup of wps_data */
|
/* initial setup of wps_data */
|
||||||
|
|
|
||||||
|
|
@ -435,9 +435,6 @@ static char *get_token_desc(struct wps_token *token, struct wps_data *data,
|
||||||
snprintf(buf, bufsize, "Volume button timeout:%d",
|
snprintf(buf, bufsize, "Volume button timeout:%d",
|
||||||
token->value.i);
|
token->value.i);
|
||||||
break;
|
break;
|
||||||
case WPS_TOKEN_VIEWMODE:
|
|
||||||
snprintf(buf, bufsize, "viewmode");
|
|
||||||
break;
|
|
||||||
default:
|
default:
|
||||||
snprintf(buf, bufsize, "FIXME (code: %d)",
|
snprintf(buf, bufsize, "FIXME (code: %d)",
|
||||||
token->type);
|
token->type);
|
||||||
|
|
|
||||||
|
|
@ -162,8 +162,6 @@ static int parse_albumart_load(const char *wps_bufptr,
|
||||||
static int parse_albumart_conditional(const char *wps_bufptr,
|
static int parse_albumart_conditional(const char *wps_bufptr,
|
||||||
struct wps_token *token, struct wps_data *wps_data);
|
struct wps_token *token, struct wps_data *wps_data);
|
||||||
#endif /* HAVE_ALBUMART */
|
#endif /* HAVE_ALBUMART */
|
||||||
static int parse_viewmode(const char *wps_bufptr,
|
|
||||||
struct wps_token *token, struct wps_data *wps_data);
|
|
||||||
|
|
||||||
#ifdef CONFIG_RTC
|
#ifdef CONFIG_RTC
|
||||||
#define WPS_RTC_REFRESH WPS_REFRESH_DYNAMIC
|
#define WPS_RTC_REFRESH WPS_REFRESH_DYNAMIC
|
||||||
|
|
@ -283,8 +281,6 @@ static const struct wps_tag all_tags[] = {
|
||||||
{ WPS_TOKEN_PLAYBACK_STATUS, "mp", WPS_REFRESH_DYNAMIC, NULL },
|
{ WPS_TOKEN_PLAYBACK_STATUS, "mp", WPS_REFRESH_DYNAMIC, NULL },
|
||||||
{ WPS_TOKEN_BUTTON_VOLUME, "mv", WPS_REFRESH_DYNAMIC,
|
{ WPS_TOKEN_BUTTON_VOLUME, "mv", WPS_REFRESH_DYNAMIC,
|
||||||
parse_timeout },
|
parse_timeout },
|
||||||
{ WPS_TOKEN_VIEWMODE, "mo", WPS_REFRESH_STATIC,
|
|
||||||
parse_viewmode },
|
|
||||||
|
|
||||||
#ifdef HAVE_LCD_BITMAP
|
#ifdef HAVE_LCD_BITMAP
|
||||||
{ WPS_TOKEN_PEAKMETER, "pm", WPS_REFRESH_PEAK_METER, NULL },
|
{ WPS_TOKEN_PEAKMETER, "pm", WPS_REFRESH_PEAK_METER, NULL },
|
||||||
|
|
@ -1146,15 +1142,6 @@ static int parse_albumart_conditional(const char *wps_bufptr,
|
||||||
};
|
};
|
||||||
#endif /* HAVE_ALBUMART */
|
#endif /* HAVE_ALBUMART */
|
||||||
|
|
||||||
static int parse_viewmode(const char *wps_bufptr,
|
|
||||||
struct wps_token *token,
|
|
||||||
struct wps_data *wps_data)
|
|
||||||
{
|
|
||||||
(void)wps_bufptr; (void)token;
|
|
||||||
wps_data->current_mode = 1;
|
|
||||||
/* are we going to add parameters? */
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
/* Parse a generic token from the given string. Return the length read */
|
/* Parse a generic token from the given string. Return the length read */
|
||||||
static int parse_token(const char *wps_bufptr, struct wps_data *wps_data)
|
static int parse_token(const char *wps_bufptr, struct wps_data *wps_data)
|
||||||
{
|
{
|
||||||
|
|
@ -1489,7 +1476,6 @@ void wps_data_init(struct wps_data *wps_data)
|
||||||
wps_data->full_line_progressbar = false;
|
wps_data->full_line_progressbar = false;
|
||||||
#endif
|
#endif
|
||||||
wps_data->button_time_volume = 0;
|
wps_data->button_time_volume = 0;
|
||||||
wps_data->current_mode = -1;
|
|
||||||
wps_data->wps_loaded = false;
|
wps_data->wps_loaded = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue