summaryrefslogtreecommitdiffstats
path: root/apps/cuesheet.c
diff options
context:
space:
mode:
authorAndree Buschmann <AndreeBuschmann@t-online.de>2011-08-26 16:46:23 +0000
committerAndree Buschmann <AndreeBuschmann@t-online.de>2011-08-26 16:46:23 +0000
commitae2233b33810180910b56bffebbecadd0a93b110 (patch)
treee8720cd66ea056d2875978ff04cf6a904b0177cb /apps/cuesheet.c
parent89f704bfb12fd4f54304e1fa14bde91d870c612f (diff)
downloadrockbox-ae2233b33810180910b56bffebbecadd0a93b110.tar.gz
rockbox-ae2233b33810180910b56bffebbecadd0a93b110.tar.bz2
rockbox-ae2233b33810180910b56bffebbecadd0a93b110.zip
Change the cuesheet fix from r30359 to have a minor binsize increase on SH1.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30362 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/cuesheet.c')
-rw-r--r--apps/cuesheet.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/apps/cuesheet.c b/apps/cuesheet.c
index afe9531ce7..935af60898 100644
--- a/apps/cuesheet.c
+++ b/apps/cuesheet.c
@@ -362,9 +362,12 @@ void cue_draw_markers(struct screen *screen, struct cuesheet *cue,
int x, int y, int w, int h)
{
int i,xi;
+ unsigned long tracklen_seconds = tracklen/1000; /* duration in seconds */
+
for (i=1; i < cue->track_count; i++)
{
- xi = x + (w * (long long)cue->tracks[i].offset)/tracklen;
+ /* Convert seconds prior to multiplication to avoid overflow. */
+ xi = x + (w * (cue->tracks[i].offset/1000)) / tracklen_seconds;
draw_veritcal_line_mark(screen, xi, y, h);
}
}