diff options
author | Jonathan Gordon <rockbox@jdgordon.info> | 2009-11-03 07:58:10 +0000 |
---|---|---|
committer | Jonathan Gordon <rockbox@jdgordon.info> | 2009-11-03 07:58:10 +0000 |
commit | f76b2f2046d1eaefae8bf6f46c6388817d8bc284 (patch) | |
tree | ed2fcefe7b595664f4bbaf6bcf4cf0b068e0a15a /apps/gui/skin_engine/skin_parser.c | |
parent | d06aafc03a594ed7ad8833babf78d31b091c72ee (diff) | |
download | rockbox-f76b2f2046d1eaefae8bf6f46c6388817d8bc284.tar.gz rockbox-f76b2f2046d1eaefae8bf6f46c6388817d8bc284.zip |
Initial recording screen skin support (usable in .sbs skins only for now)
new skin tokens:
%Rp - does the target have recording?
%Rf - samplerate
%Re - encoder
%Rb - bitrate
%Rm - mono/stereo
Please put all bugs from these (which very probably dont work 100%) into FS#10755. And someone who knows how the recoding capabilities work please look this over... ideally the same value should be returned for the middle three tags no matter what the capabilities of the target are.
CustomWPS on the wiki for more details
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23491 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/gui/skin_engine/skin_parser.c')
-rw-r--r-- | apps/gui/skin_engine/skin_parser.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/apps/gui/skin_engine/skin_parser.c b/apps/gui/skin_engine/skin_parser.c index ae33e907f0..a72dcb8f02 100644 --- a/apps/gui/skin_engine/skin_parser.c +++ b/apps/gui/skin_engine/skin_parser.c | |||
@@ -360,7 +360,16 @@ static const struct wps_tag all_tags[] = { | |||
360 | { WPS_TOKEN_LASTTOUCH, "Tl", WPS_REFRESH_DYNAMIC, parse_timeout }, | 360 | { WPS_TOKEN_LASTTOUCH, "Tl", WPS_REFRESH_DYNAMIC, parse_timeout }, |
361 | { WPS_TOKEN_CURRENT_SCREEN, "cs", WPS_REFRESH_DYNAMIC, NULL }, | 361 | { WPS_TOKEN_CURRENT_SCREEN, "cs", WPS_REFRESH_DYNAMIC, NULL }, |
362 | { WPS_NO_TOKEN, "T", 0, parse_touchregion }, | 362 | { WPS_NO_TOKEN, "T", 0, parse_touchregion }, |
363 | 363 | ||
364 | |||
365 | /* Recording Tokens */ | ||
366 | { WPS_TOKEN_HAVE_RECORDING, "Rp", WPS_REFRESH_STATIC, NULL }, | ||
367 | #ifdef HAVE_RECORDING | ||
368 | { WPS_TOKEN_REC_FREQ, "Rf", WPS_REFRESH_DYNAMIC, NULL }, | ||
369 | { WPS_TOKEN_REC_ENCODER, "Re", WPS_REFRESH_DYNAMIC, NULL }, | ||
370 | { WPS_TOKEN_REC_BITRATE, "Rb", WPS_REFRESH_DYNAMIC, NULL }, | ||
371 | { WPS_TOKEN_REC_MONO, "Rm", WPS_REFRESH_DYNAMIC, NULL }, | ||
372 | #endif | ||
364 | { WPS_TOKEN_UNKNOWN, "", 0, NULL } | 373 | { WPS_TOKEN_UNKNOWN, "", 0, NULL } |
365 | /* the array MUST end with an empty string (first char is \0) */ | 374 | /* the array MUST end with an empty string (first char is \0) */ |
366 | }; | 375 | }; |
@@ -1461,6 +1470,12 @@ static int check_feature_tag(const char *wps_bufptr, const int type) | |||
1461 | #else | 1470 | #else |
1462 | return find_false_branch(wps_bufptr); | 1471 | return find_false_branch(wps_bufptr); |
1463 | #endif | 1472 | #endif |
1473 | case WPS_TOKEN_HAVE_RECORDING: | ||
1474 | #ifdef HAVE_RECORDING | ||
1475 | return 0; | ||
1476 | #else | ||
1477 | return find_false_branch(wps_bufptr); | ||
1478 | #endif | ||
1464 | default: /* not a tag we care about, just don't skip */ | 1479 | default: /* not a tag we care about, just don't skip */ |
1465 | return 0; | 1480 | return 0; |
1466 | } | 1481 | } |