summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorDominik Riebeling <Dominik.Riebeling@gmail.com>2006-12-29 19:17:03 +0000
committerDominik Riebeling <Dominik.Riebeling@gmail.com>2006-12-29 19:17:03 +0000
commit08c813d45acb607a26861604666f526809d5881c (patch)
treedaf3f0c6ca260984a96cfee7070a4f202c8d3e54 /apps
parent5dc0abda110ea063fd53b0158d44078c01de11cb (diff)
downloadrockbox-08c813d45acb607a26861604666f526809d5881c.zip
rockbox-08c813d45acb607a26861604666f526809d5881c.tar.gz
rockbox-08c813d45acb607a26861604666f526809d5881c.tar.bz2
rockbox-08c813d45acb607a26861604666f526809d5881c.tar.xz
Respect the progressbar length when drawing AB markers. Fixes FS#6463. Also fix a function name typo.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11857 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r--apps/abrepeat.c17
-rw-r--r--apps/abrepeat.h2
-rw-r--r--apps/gui/gwps-common.c3
3 files changed, 11 insertions, 11 deletions
diff --git a/apps/abrepeat.c b/apps/abrepeat.c
index caf76ff..f1a430b 100644
--- a/apps/abrepeat.c
+++ b/apps/abrepeat.c
@@ -166,7 +166,7 @@ static inline int ab_calc_mark_x_pos(int mark, int capacity,
return offset + ( (w * mark) / capacity );
}
-static inline void ab_draw_veritcal_line_mark(struct screen * screen,
+static inline void ab_draw_vertical_line_mark(struct screen * screen,
int x, int y, int h)
{
screen->set_drawmode(DRMODE_COMPLEMENT);
@@ -192,20 +192,19 @@ static inline void ab_draw_arrow_mark(struct screen * screen,
}
void ab_draw_markers(struct screen * screen, int capacity,
- int x, int y, int h)
+ int x0, int x1, int y, int h)
{
- int w = screen->width;
/* if both markers are set, determine if they're far enough apart
to draw arrows */
if ( ab_A_marker_set() && ab_B_marker_set() )
{
- int xa = ab_calc_mark_x_pos(ab_A_marker, capacity, x, w);
- int xb = ab_calc_mark_x_pos(ab_B_marker, capacity, x, w);
+ int xa = ab_calc_mark_x_pos(ab_A_marker, capacity, x0, x1);
+ int xb = ab_calc_mark_x_pos(ab_B_marker, capacity, x0, x1);
int arrow_width = (h+1) / 2;
if ( (xb-xa) < (arrow_width*2) )
{
- ab_draw_veritcal_line_mark(screen, xa, y, h);
- ab_draw_veritcal_line_mark(screen, xb, y, h);
+ ab_draw_vertical_line_mark(screen, xa, y, h);
+ ab_draw_vertical_line_mark(screen, xb, y, h);
}
else
{
@@ -217,12 +216,12 @@ void ab_draw_markers(struct screen * screen, int capacity,
{
if (ab_A_marker_set())
{
- int xa = ab_calc_mark_x_pos(ab_A_marker, capacity, x, w);
+ int xa = ab_calc_mark_x_pos(ab_A_marker, capacity, x0, x1);
ab_draw_arrow_mark(screen, xa, y, h, DIRECTION_RIGHT);
}
if (ab_B_marker_set())
{
- int xb = ab_calc_mark_x_pos(ab_B_marker, capacity, x, w);
+ int xb = ab_calc_mark_x_pos(ab_B_marker, capacity, x0, x1);
ab_draw_arrow_mark(screen, xb, y, h, DIRECTION_LEFT);
}
}
diff --git a/apps/abrepeat.h b/apps/abrepeat.h
index d7bed0a..27b3dc2 100644
--- a/apps/abrepeat.h
+++ b/apps/abrepeat.h
@@ -49,7 +49,7 @@ void ab_end_of_track_report(void);
#ifdef HAVE_LCD_BITMAP
#include "screen_access.h"
void ab_draw_markers(struct screen * screen, int capacity,
- int x, int y, int h);
+ int x0, int x1, int y, int h);
#endif
/* These functions really need to be inlined for speed */
diff --git a/apps/gui/gwps-common.c b/apps/gui/gwps-common.c
index 51d62d0..f2aa497 100644
--- a/apps/gui/gwps-common.c
+++ b/apps/gui/gwps-common.c
@@ -1840,7 +1840,8 @@ bool gui_wps_refresh(struct gui_wps *gwps, int ffwd_offset,
HORIZONTAL);
#ifdef AB_REPEAT_ENABLE
if ( ab_repeat_mode_enabled() )
- ab_draw_markers(display, state->id3->length, 0, sb_y,
+ ab_draw_markers(display, state->id3->length,
+ data->progress_start, data->progress_end, sb_y,
data->progress_height);
#endif
update_line = true;