summaryrefslogtreecommitdiff
path: root/apps/gui/skin_engine/skin_tokens.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/gui/skin_engine/skin_tokens.c')
-rw-r--r--apps/gui/skin_engine/skin_tokens.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/apps/gui/skin_engine/skin_tokens.c b/apps/gui/skin_engine/skin_tokens.c
index 0101a5e01e..a1d0a4b840 100644
--- a/apps/gui/skin_engine/skin_tokens.c
+++ b/apps/gui/skin_engine/skin_tokens.c
@@ -66,11 +66,10 @@
66#include "fixedpoint.h" 66#include "fixedpoint.h"
67#endif 67#endif
68#include "list.h" 68#include "list.h"
69#include "wps.h"
69 70
70#define NOINLINE __attribute__ ((noinline)) 71#define NOINLINE __attribute__ ((noinline))
71 72
72extern struct wps_state wps_state;
73
74static const char* get_codectype(const struct mp3entry* id3) 73static const char* get_codectype(const struct mp3entry* id3)
75{ 74{
76 if (id3 && id3->codectype < AFMT_NUM_CODECS) { 75 if (id3 && id3->codectype < AFMT_NUM_CODECS) {
@@ -228,7 +227,7 @@ static const char* get_filename_token(struct wps_token *token, char* filename,
228const char *get_id3_token(struct wps_token *token, struct mp3entry *id3, 227const char *get_id3_token(struct wps_token *token, struct mp3entry *id3,
229 char *filename, char *buf, int buf_size, int limit, int *intval) 228 char *filename, char *buf, int buf_size, int limit, int *intval)
230{ 229{
231 struct wps_state *state = &wps_state; 230 struct wps_state *state = get_wps_state();
232 if (id3) 231 if (id3)
233 { 232 {
234 unsigned long length = id3->length; 233 unsigned long length = id3->length;
@@ -540,7 +539,7 @@ const char *get_radio_token(struct wps_token *token, int preset_offset,
540static struct mp3entry* get_mp3entry_from_offset(int offset, char **filename) 539static struct mp3entry* get_mp3entry_from_offset(int offset, char **filename)
541{ 540{
542 struct mp3entry* pid3 = NULL; 541 struct mp3entry* pid3 = NULL;
543 struct wps_state *state = skin_get_global_state(); 542 struct wps_state *state = get_wps_state();
544 struct cuesheet *cue = state->id3 ? state->id3->cuesheet : NULL; 543 struct cuesheet *cue = state->id3 ? state->id3->cuesheet : NULL;
545 const char *fname = NULL; 544 const char *fname = NULL;
546 if (cue && cue->curr_track_idx + offset < cue->track_count) 545 if (cue && cue->curr_track_idx + offset < cue->track_count)
@@ -678,7 +677,7 @@ const char *get_token_value(struct gui_wps *gwps,
678 return NULL; 677 return NULL;
679 678
680 struct wps_data *data = gwps->data; 679 struct wps_data *data = gwps->data;
681 struct wps_state *state = skin_get_global_state(); 680 struct wps_state *state = get_wps_state();
682 struct mp3entry *id3; /* Think very carefully about using this. 681 struct mp3entry *id3; /* Think very carefully about using this.
683 maybe get_id3_token() is the better place? */ 682 maybe get_id3_token() is the better place? */
684 const char *out_text = NULL; 683 const char *out_text = NULL;