From f50885534ec6fa78c2c89e275c5ffd592be5cd2e Mon Sep 17 00:00:00 2001 From: Teruaki Kawashima Date: Sun, 7 Mar 2010 12:51:23 +0000 Subject: 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 --- apps/cuesheet.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'apps/cuesheet.c') 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, } /* draw the cuesheet markers for a track of length "tracklen", - between (x1,y) and (x2,y) */ + between (x,y) and (x+w,y) */ void cue_draw_markers(struct screen *screen, struct cuesheet *cue, unsigned long tracklen, - int x1, int x2, int y, int h) + int x, int y, int w, int h) { int i,xi; - int w = x2 - x1; for (i=1; i < cue->track_count; i++) { - xi = x1 + (w * cue->tracks[i].offset)/tracklen; + xi = x + (w * cue->tracks[i].offset)/tracklen; draw_veritcal_line_mark(screen, xi, y, h); } } -- cgit v1.2.3