summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apps/gui/gwps-common.c8
-rw-r--r--apps/gui/gwps.h4
-rw-r--r--apps/gui/wps_parser.c16
3 files changed, 17 insertions, 11 deletions
diff --git a/apps/gui/gwps-common.c b/apps/gui/gwps-common.c
index 2bd2e4c617..ffb7ed60d5 100644
--- a/apps/gui/gwps-common.c
+++ b/apps/gui/gwps-common.c
@@ -1284,12 +1284,16 @@ static char *get_tag(struct gui_wps *gwps,
1284 } 1284 }
1285 return buf; 1285 return buf;
1286 } 1286 }
1287#endif
1287 1288
1289#if (CONFIG_CODEC != MAS3507D)
1288 case WPS_TOKEN_SOUND_PITCH: 1290 case WPS_TOKEN_SOUND_PITCH:
1291 {
1292 int val = sound_get_pitch();
1289 snprintf(buf, buf_size, "%d.%d", 1293 snprintf(buf, buf_size, "%d.%d",
1290 *intval / 10, *intval % 10); 1294 val / 10, val % 10);
1291 return buf; 1295 return buf;
1292 1296 }
1293#endif 1297#endif
1294 1298
1295#ifdef HAS_BUTTON_HOLD 1299#ifdef HAS_BUTTON_HOLD
diff --git a/apps/gui/gwps.h b/apps/gui/gwps.h
index c18fc0c4e3..02a83085b9 100644
--- a/apps/gui/gwps.h
+++ b/apps/gui/gwps.h
@@ -122,9 +122,11 @@ enum wps_token_type {
122 WPS_TOKEN_BATTERY_CHARGING, 122 WPS_TOKEN_BATTERY_CHARGING,
123 WPS_TOKEN_BATTERY_SLEEPTIME, 123 WPS_TOKEN_BATTERY_SLEEPTIME,
124 124
125#if (CONFIG_CODEC == SWCODEC)
126 /* Sound */ 125 /* Sound */
126#if (CONFIG_CODEC != MAS3507D)
127 WPS_TOKEN_SOUND_PITCH, 127 WPS_TOKEN_SOUND_PITCH,
128#endif
129#if (CONFIG_CODEC == SWCODEC)
128 WPS_TOKEN_REPLAYGAIN, 130 WPS_TOKEN_REPLAYGAIN,
129#endif 131#endif
130 132
diff --git a/apps/gui/wps_parser.c b/apps/gui/wps_parser.c
index ef9d446444..07a1df64ac 100644
--- a/apps/gui/wps_parser.c
+++ b/apps/gui/wps_parser.c
@@ -40,24 +40,24 @@
40 40
41/* level of current conditional. 41/* level of current conditional.
42 -1 means we're not in a conditional. */ 42 -1 means we're not in a conditional. */
43int level = -1; 43static int level = -1;
44 44
45/* index of the last WPS_TOKEN_CONDITIONAL_OPTION 45/* index of the last WPS_TOKEN_CONDITIONAL_OPTION
46 or WPS_TOKEN_CONDITIONAL_START in current level */ 46 or WPS_TOKEN_CONDITIONAL_START in current level */
47int lastcond[WPS_MAX_COND_LEVEL]; 47static int lastcond[WPS_MAX_COND_LEVEL];
48 48
49/* index of the WPS_TOKEN_CONDITIONAL in current level */ 49/* index of the WPS_TOKEN_CONDITIONAL in current level */
50int condindex[WPS_MAX_COND_LEVEL]; 50static int condindex[WPS_MAX_COND_LEVEL];
51 51
52/* number of condtional options in current level */ 52/* number of condtional options in current level */
53int numoptions[WPS_MAX_COND_LEVEL]; 53static int numoptions[WPS_MAX_COND_LEVEL];
54 54
55#ifdef HAVE_LCD_BITMAP 55#ifdef HAVE_LCD_BITMAP
56/* pointers to the bitmap filenames in the WPS source */ 56/* pointers to the bitmap filenames in the WPS source */
57const char *bmp_names[MAX_IMAGES]; 57static const char *bmp_names[MAX_IMAGES];
58const char *pb_bmp_name; 58static const char *pb_bmp_name;
59#if LCD_DEPTH > 1 59#if LCD_DEPTH > 1
60const char *backdrop_bmp_name; 60static const char *backdrop_bmp_name;
61#endif 61#endif
62#endif 62#endif
63 63
@@ -185,7 +185,7 @@ static const struct wps_tag all_tags[] = {
185 { "Iy", WPS_TOKEN_METADATA_YEAR, WPS_REFRESH_DYNAMIC, NULL }, 185 { "Iy", WPS_TOKEN_METADATA_YEAR, WPS_REFRESH_DYNAMIC, NULL },
186 { "IC", WPS_TOKEN_METADATA_COMMENT, WPS_REFRESH_DYNAMIC, NULL }, 186 { "IC", WPS_TOKEN_METADATA_COMMENT, WPS_REFRESH_DYNAMIC, NULL },
187 187
188#if (CONFIG_CODEC == SWCODEC) 188#if (CONFIG_CODEC != MAS3507D)
189 { "Sp", WPS_TOKEN_SOUND_PITCH, WPS_REFRESH_DYNAMIC, NULL }, 189 { "Sp", WPS_TOKEN_SOUND_PITCH, WPS_REFRESH_DYNAMIC, NULL },
190#endif 190#endif
191 191