diff options
author | Mark Arigo <markarigo@gmail.com> | 2006-08-23 20:07:59 +0000 |
---|---|---|
committer | Mark Arigo <markarigo@gmail.com> | 2006-08-23 20:07:59 +0000 |
commit | 1e9ac7a32e580587bdd5199f737c5bc2a92551f1 (patch) | |
tree | 3a9b5c18f279f9493391d4533cf6f4d9f889d3ac | |
parent | 34301bb37bb34f478bf4c3fc78385929dd2533d8 (diff) | |
download | rockbox-1e9ac7a32e580587bdd5199f737c5bc2a92551f1.tar.gz rockbox-1e9ac7a32e580587bdd5199f737c5bc2a92551f1.zip |
Allow scrolling lines with different x-margins. The margin at the time of the call to puts_scroll will be used as the margin for that line.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10727 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r-- | firmware/drivers/lcd-16bit.c | 4 | ||||
-rw-r--r-- | firmware/drivers/lcd-2bit-horz.c | 4 | ||||
-rw-r--r-- | firmware/drivers/lcd-h100-remote.c | 4 | ||||
-rw-r--r-- | firmware/drivers/lcd-h100.c | 4 | ||||
-rw-r--r-- | firmware/drivers/lcd-recorder.c | 4 | ||||
-rwxr-xr-x | firmware/drivers/lcd-remote-2bit-vi.c | 4 |
6 files changed, 12 insertions, 12 deletions
diff --git a/firmware/drivers/lcd-16bit.c b/firmware/drivers/lcd-16bit.c index fd95f2aa16..e6ae28bc19 100644 --- a/firmware/drivers/lcd-16bit.c +++ b/firmware/drivers/lcd-16bit.c | |||
@@ -900,7 +900,7 @@ void lcd_puts_scroll_style_offset(int x, int y, const unsigned char *string, | |||
900 | 900 | ||
901 | s->len = utf8length(string); | 901 | s->len = utf8length(string); |
902 | s->offset = offset; | 902 | s->offset = offset; |
903 | s->startx = x; | 903 | s->startx = xmargin + x * s->width / s->len; |
904 | s->backward = false; | 904 | s->backward = false; |
905 | scrolling_lines |= (1<<y); | 905 | scrolling_lines |= (1<<y); |
906 | } | 906 | } |
@@ -938,7 +938,7 @@ static void scroll_thread(void) | |||
938 | s->offset += scroll_step; | 938 | s->offset += scroll_step; |
939 | 939 | ||
940 | pf = font_get(curfont); | 940 | pf = font_get(curfont); |
941 | xpos = xmargin + s->startx * s->width / s->len; | 941 | xpos = s->startx; |
942 | ypos = ymargin + index * pf->height; | 942 | ypos = ymargin + index * pf->height; |
943 | 943 | ||
944 | if (s->bidir) { /* scroll bidirectional */ | 944 | if (s->bidir) { /* scroll bidirectional */ |
diff --git a/firmware/drivers/lcd-2bit-horz.c b/firmware/drivers/lcd-2bit-horz.c index 68074e36e8..33f483d38d 100644 --- a/firmware/drivers/lcd-2bit-horz.c +++ b/firmware/drivers/lcd-2bit-horz.c | |||
@@ -882,7 +882,7 @@ void lcd_puts_scroll_style_offset(int x, int y, const unsigned char *string, | |||
882 | 882 | ||
883 | s->len = utf8length((char *)string); | 883 | s->len = utf8length((char *)string); |
884 | s->offset = offset; | 884 | s->offset = offset; |
885 | s->startx = x; | 885 | s->startx = xmargin + x * s->width / s->len;; |
886 | s->backward = false; | 886 | s->backward = false; |
887 | scrolling_lines |= (1<<y); | 887 | scrolling_lines |= (1<<y); |
888 | } | 888 | } |
@@ -920,7 +920,7 @@ static void scroll_thread(void) | |||
920 | s->offset += scroll_step; | 920 | s->offset += scroll_step; |
921 | 921 | ||
922 | pf = font_get(curfont); | 922 | pf = font_get(curfont); |
923 | xpos = xmargin + s->startx * s->width / s->len; | 923 | xpos = s->startx; |
924 | ypos = ymargin + index * pf->height; | 924 | ypos = ymargin + index * pf->height; |
925 | 925 | ||
926 | if (s->bidir) { /* scroll bidirectional */ | 926 | if (s->bidir) { /* scroll bidirectional */ |
diff --git a/firmware/drivers/lcd-h100-remote.c b/firmware/drivers/lcd-h100-remote.c index bf4445462d..ed5816cebf 100644 --- a/firmware/drivers/lcd-h100-remote.c +++ b/firmware/drivers/lcd-h100-remote.c | |||
@@ -1388,7 +1388,7 @@ void lcd_remote_puts_scroll_style_offset(int x, int y, const unsigned char *stri | |||
1388 | 1388 | ||
1389 | s->len = utf8length((char *)string); | 1389 | s->len = utf8length((char *)string); |
1390 | s->offset = offset; | 1390 | s->offset = offset; |
1391 | s->startx = x; | 1391 | s->startx = xmargin + x * s->width / s->len;; |
1392 | s->backward = false; | 1392 | s->backward = false; |
1393 | scrolling_lines |= (1<<y); | 1393 | scrolling_lines |= (1<<y); |
1394 | } | 1394 | } |
@@ -1458,7 +1458,7 @@ static void scroll_thread(void) | |||
1458 | s->offset += scroll_step; | 1458 | s->offset += scroll_step; |
1459 | 1459 | ||
1460 | pf = font_get(curfont); | 1460 | pf = font_get(curfont); |
1461 | xpos = xmargin + s->startx * s->width / s->len; | 1461 | xpos = s->startx; |
1462 | ypos = ymargin + index * pf->height; | 1462 | ypos = ymargin + index * pf->height; |
1463 | 1463 | ||
1464 | if (s->bidir) { /* scroll bidirectional */ | 1464 | if (s->bidir) { /* scroll bidirectional */ |
diff --git a/firmware/drivers/lcd-h100.c b/firmware/drivers/lcd-h100.c index fd456007df..8407876d34 100644 --- a/firmware/drivers/lcd-h100.c +++ b/firmware/drivers/lcd-h100.c | |||
@@ -1224,7 +1224,7 @@ void lcd_puts_scroll_style_offset(int x, int y, const unsigned char *string, | |||
1224 | 1224 | ||
1225 | s->len = utf8length((char *)string); | 1225 | s->len = utf8length((char *)string); |
1226 | s->offset = offset; | 1226 | s->offset = offset; |
1227 | s->startx = x; | 1227 | s->startx = xmargin + x * s->width / s->len; |
1228 | s->backward = false; | 1228 | s->backward = false; |
1229 | scrolling_lines |= (1<<y); | 1229 | scrolling_lines |= (1<<y); |
1230 | } | 1230 | } |
@@ -1262,7 +1262,7 @@ static void scroll_thread(void) | |||
1262 | s->offset += scroll_step; | 1262 | s->offset += scroll_step; |
1263 | 1263 | ||
1264 | pf = font_get(curfont); | 1264 | pf = font_get(curfont); |
1265 | xpos = xmargin + s->startx * s->width / s->len; | 1265 | xpos = s->startx; |
1266 | ypos = ymargin + index * pf->height; | 1266 | ypos = ymargin + index * pf->height; |
1267 | 1267 | ||
1268 | if (s->bidir) { /* scroll bidirectional */ | 1268 | if (s->bidir) { /* scroll bidirectional */ |
diff --git a/firmware/drivers/lcd-recorder.c b/firmware/drivers/lcd-recorder.c index 75faa18b28..1987d9a3ed 100644 --- a/firmware/drivers/lcd-recorder.c +++ b/firmware/drivers/lcd-recorder.c | |||
@@ -1062,7 +1062,7 @@ void lcd_puts_scroll_style_offset(int x, int y, const unsigned char *string, | |||
1062 | 1062 | ||
1063 | s->len = utf8length(string); | 1063 | s->len = utf8length(string); |
1064 | s->offset = offset; | 1064 | s->offset = offset; |
1065 | s->startx = x; | 1065 | s->startx = xmargin + x * s->width / s->len;; |
1066 | s->backward = false; | 1066 | s->backward = false; |
1067 | scrolling_lines |= (1<<y); | 1067 | scrolling_lines |= (1<<y); |
1068 | } | 1068 | } |
@@ -1100,7 +1100,7 @@ static void scroll_thread(void) | |||
1100 | s->offset += scroll_step; | 1100 | s->offset += scroll_step; |
1101 | 1101 | ||
1102 | pf = font_get(curfont); | 1102 | pf = font_get(curfont); |
1103 | xpos = xmargin + s->startx * s->width / s->len; | 1103 | xpos = s->startx; |
1104 | ypos = ymargin + index * pf->height; | 1104 | ypos = ymargin + index * pf->height; |
1105 | 1105 | ||
1106 | if (s->bidir) { /* scroll bidirectional */ | 1106 | if (s->bidir) { /* scroll bidirectional */ |
diff --git a/firmware/drivers/lcd-remote-2bit-vi.c b/firmware/drivers/lcd-remote-2bit-vi.c index eefbae1de3..48f8b8a25f 100755 --- a/firmware/drivers/lcd-remote-2bit-vi.c +++ b/firmware/drivers/lcd-remote-2bit-vi.c | |||
@@ -1006,7 +1006,7 @@ void lcd_remote_puts_scroll_style_offset(int x, int y, const unsigned char *stri | |||
1006 | 1006 | ||
1007 | s->len = utf8length((char *)string); | 1007 | s->len = utf8length((char *)string); |
1008 | s->offset = offset; | 1008 | s->offset = offset; |
1009 | s->startx = x; | 1009 | s->startx = xmargin + x * s->width / s->len;; |
1010 | s->backward = false; | 1010 | s->backward = false; |
1011 | scrolling_lines |= (1<<y); | 1011 | scrolling_lines |= (1<<y); |
1012 | } | 1012 | } |
@@ -1120,7 +1120,7 @@ static void scroll_thread(void) | |||
1120 | s->offset += scroll_step; | 1120 | s->offset += scroll_step; |
1121 | 1121 | ||
1122 | pf = font_get(curfont); | 1122 | pf = font_get(curfont); |
1123 | xpos = xmargin + s->startx * s->width / s->len; | 1123 | xpos = s->startx; |
1124 | ypos = ymargin + index * pf->height; | 1124 | ypos = ymargin + index * pf->height; |
1125 | 1125 | ||
1126 | if (s->bidir) { /* scroll bidirectional */ | 1126 | if (s->bidir) { /* scroll bidirectional */ |