summaryrefslogtreecommitdiff
path: root/apps/gui/skin_engine/skin_tokens.c
diff options
context:
space:
mode:
authorAndree Buschmann <AndreeBuschmann@t-online.de>2011-02-24 19:10:59 +0000
committerAndree Buschmann <AndreeBuschmann@t-online.de>2011-02-24 19:10:59 +0000
commit71ceac0b740398050af4f21b56acd5b31e2520f0 (patch)
treeda550f14a3c81f62aceae698c8b459287d201a01 /apps/gui/skin_engine/skin_tokens.c
parent65109732230849eeb9eec2f56f9e046ad6b476c3 (diff)
downloadrockbox-71ceac0b740398050af4f21b56acd5b31e2520f0.tar.gz
rockbox-71ceac0b740398050af4f21b56acd5b31e2520f0.zip
FS#11964. Rework replaygain handling to save metadata buffer and binsize. Remove string representation of replaygain and use a dedicated ftoa implementation for WPS/screen info.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29388 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/gui/skin_engine/skin_tokens.c')
-rw-r--r--apps/gui/skin_engine/skin_tokens.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/apps/gui/skin_engine/skin_tokens.c b/apps/gui/skin_engine/skin_tokens.c
index f455999b2a..1fbe3d714e 100644
--- a/apps/gui/skin_engine/skin_tokens.c
+++ b/apps/gui/skin_engine/skin_tokens.c
@@ -35,6 +35,7 @@
35#include "sound.h" 35#include "sound.h"
36#include "debug.h" 36#include "debug.h"
37#include "cuesheet.h" 37#include "cuesheet.h"
38#include "replaygain.h"
38#ifdef HAVE_LCD_CHARCELLS 39#ifdef HAVE_LCD_CHARCELLS
39#include "hwcompat.h" 40#include "hwcompat.h"
40#endif 41#endif
@@ -1305,8 +1306,8 @@ const char *get_token_value(struct gui_wps *gwps,
1305 { 1306 {
1306 int type; 1307 int type;
1307 if (LIKELY(id3)) 1308 if (LIKELY(id3))
1308 type = get_replaygain_mode(id3->track_gain_string != NULL, 1309 type = get_replaygain_mode(id3->track_gain != 0,
1309 id3->album_gain_string != NULL); 1310 id3->album_gain != 0);
1310 else 1311 else
1311 type = -1; 1312 type = -1;
1312 1313
@@ -1331,11 +1332,11 @@ const char *get_token_value(struct gui_wps *gwps,
1331 /* due to above, coming here with !id3 shouldn't be possible */ 1332 /* due to above, coming here with !id3 shouldn't be possible */
1332 case 2: 1333 case 2:
1333 case 4: 1334 case 4:
1334 strlcpy(buf, id3->track_gain_string, buf_size); 1335 replaygain_itoa(buf, buf_size, id3->track_gain);
1335 break; 1336 break;
1336 case 3: 1337 case 3:
1337 case 5: 1338 case 5:
1338 strlcpy(buf, id3->album_gain_string, buf_size); 1339 replaygain_itoa(buf, buf_size, id3->album_gain);
1339 break; 1340 break;
1340 } 1341 }
1341 return buf; 1342 return buf;