summaryrefslogtreecommitdiff
path: root/apps/cuesheet.c
diff options
context:
space:
mode:
authorTeruaki Kawashima <teru@rockbox.org>2010-03-07 12:51:23 +0000
committerTeruaki Kawashima <teru@rockbox.org>2010-03-07 12:51:23 +0000
commitf50885534ec6fa78c2c89e275c5ffd592be5cd2e (patch)
treeb60a7d0f7a1c5124cddedeac585c0bb1c1a11d4f /apps/cuesheet.c
parent1e9789879ff620c78b594801bf37abc256bdcc2b (diff)
downloadrockbox-f50885534ec6fa78c2c89e275c5ffd592be5cd2e.tar.gz
rockbox-f50885534ec6fa78c2c89e275c5ffd592be5cd2e.zip
Pass width instead of x+width to ab_draw_markers()/cue_draw_markers() and don't recalculate the width in these functions.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25053 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/cuesheet.c')
-rw-r--r--apps/cuesheet.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/apps/cuesheet.c b/apps/cuesheet.c
index ef1eff8a85..cb3ba6569a 100644
--- a/apps/cuesheet.c
+++ b/apps/cuesheet.c
@@ -381,16 +381,15 @@ static inline void draw_veritcal_line_mark(struct screen * screen,
381} 381}
382 382
383/* draw the cuesheet markers for a track of length "tracklen", 383/* draw the cuesheet markers for a track of length "tracklen",
384 between (x1,y) and (x2,y) */ 384 between (x,y) and (x+w,y) */
385void cue_draw_markers(struct screen *screen, struct cuesheet *cue, 385void cue_draw_markers(struct screen *screen, struct cuesheet *cue,
386 unsigned long tracklen, 386 unsigned long tracklen,
387 int x1, int x2, int y, int h) 387 int x, int y, int w, int h)
388{ 388{
389 int i,xi; 389 int i,xi;
390 int w = x2 - x1;
391 for (i=1; i < cue->track_count; i++) 390 for (i=1; i < cue->track_count; i++)
392 { 391 {
393 xi = x1 + (w * cue->tracks[i].offset)/tracklen; 392 xi = x + (w * cue->tracks[i].offset)/tracklen;
394 draw_veritcal_line_mark(screen, xi, y, h); 393 draw_veritcal_line_mark(screen, xi, y, h);
395 } 394 }
396} 395}