diff options
author | Jonathan Gordon <rockbox@jdgordon.info> | 2008-06-23 13:20:35 +0000 |
---|---|---|
committer | Jonathan Gordon <rockbox@jdgordon.info> | 2008-06-23 13:20:35 +0000 |
commit | bdbdb97f19655a635a2d37f81f9fe1e31f9162b2 (patch) | |
tree | ea5672478b70e550910bc179a7644afa70c0d057 /firmware/drivers/lcd-charcell.c | |
parent | c1b8df05e1def3096ff6d2ea55f23b2e72936fce (diff) | |
download | rockbox-bdbdb97f19655a635a2d37f81f9fe1e31f9162b2.tar.gz rockbox-bdbdb97f19655a635a2d37f81f9fe1e31f9162b2.zip |
FS#9051 - remove LCD margins... use viewports if you need them...
NOTE to WPS people....
%m has been removed, but (i think) because of the other %m tags it wont fail if you try loading a wps with %m|..|, it will just be ignored.
Also note that if the statusbar is enabled the default viewport is 8 pixels shorter than when its not, i.e (0,0) is really (0,8) if the statusbar is shown... I dont think this will be a major issue because almost no WPS show the bar and use bitmaps... text only WPS shouldnt be affected.
Please report problem screens in http://forums.rockbox.org/index.php?topic=17358.0
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17763 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/drivers/lcd-charcell.c')
-rw-r--r-- | firmware/drivers/lcd-charcell.c | 26 |
1 files changed, 4 insertions, 22 deletions
diff --git a/firmware/drivers/lcd-charcell.c b/firmware/drivers/lcd-charcell.c index 1bc634cd2f..1c43b83ab1 100644 --- a/firmware/drivers/lcd-charcell.c +++ b/firmware/drivers/lcd-charcell.c | |||
@@ -58,8 +58,6 @@ static struct viewport default_vp = | |||
58 | .y = 0, | 58 | .y = 0, |
59 | .width = LCD_WIDTH, | 59 | .width = LCD_WIDTH, |
60 | .height = LCD_HEIGHT, | 60 | .height = LCD_HEIGHT, |
61 | .xmargin = 0, | ||
62 | .ymargin = 0, | ||
63 | }; | 61 | }; |
64 | 62 | ||
65 | static struct viewport* current_vp = &default_vp; | 63 | static struct viewport* current_vp = &default_vp; |
@@ -92,22 +90,6 @@ void lcd_update_viewport(void) | |||
92 | 90 | ||
93 | /** parameter handling **/ | 91 | /** parameter handling **/ |
94 | 92 | ||
95 | void lcd_setmargins(int x, int y) | ||
96 | { | ||
97 | current_vp->xmargin = x; | ||
98 | current_vp->ymargin = y; | ||
99 | } | ||
100 | |||
101 | int lcd_getxmargin(void) | ||
102 | { | ||
103 | return current_vp->xmargin; | ||
104 | } | ||
105 | |||
106 | int lcd_getymargin(void) | ||
107 | { | ||
108 | return current_vp->ymargin; | ||
109 | } | ||
110 | |||
111 | int lcd_getwidth(void) | 93 | int lcd_getwidth(void) |
112 | { | 94 | { |
113 | return current_vp->width; | 95 | return current_vp->width; |
@@ -484,7 +466,7 @@ void lcd_puts_scroll_offset(int x, int y, const unsigned char *string, | |||
484 | lcd_puts_offset(x, y, string, offset); | 466 | lcd_puts_offset(x, y, string, offset); |
485 | len = utf8length(string); | 467 | len = utf8length(string); |
486 | 468 | ||
487 | if (current_vp->width - x - current_vp->xmargin < len) | 469 | if (current_vp->width - x < len) |
488 | { | 470 | { |
489 | /* prepare scroll line */ | 471 | /* prepare scroll line */ |
490 | char *end; | 472 | char *end; |
@@ -498,7 +480,7 @@ void lcd_puts_scroll_offset(int x, int y, const unsigned char *string, | |||
498 | /* scroll bidirectional or forward only depending on the string width */ | 480 | /* scroll bidirectional or forward only depending on the string width */ |
499 | if (lcd_scroll_info.bidir_limit) | 481 | if (lcd_scroll_info.bidir_limit) |
500 | { | 482 | { |
501 | s->bidir = s->len < (current_vp->width - current_vp->xmargin) * | 483 | s->bidir = s->len < (current_vp->width) * |
502 | (100 + lcd_scroll_info.bidir_limit) / 100; | 484 | (100 + lcd_scroll_info.bidir_limit) / 100; |
503 | } | 485 | } |
504 | else | 486 | else |
@@ -517,7 +499,7 @@ void lcd_puts_scroll_offset(int x, int y, const unsigned char *string, | |||
517 | s->vp = current_vp; | 499 | s->vp = current_vp; |
518 | s->y = y; | 500 | s->y = y; |
519 | s->offset = offset; | 501 | s->offset = offset; |
520 | s->startx = current_vp->xmargin + x; | 502 | s->startx = x; |
521 | s->backward = false; | 503 | s->backward = false; |
522 | lcd_scroll_info.lines++; | 504 | lcd_scroll_info.lines++; |
523 | } | 505 | } |
@@ -547,7 +529,7 @@ void lcd_scroll_fn(void) | |||
547 | s->offset++; | 529 | s->offset++; |
548 | 530 | ||
549 | xpos = s->startx; | 531 | xpos = s->startx; |
550 | ypos = current_vp->ymargin + s->y; | 532 | ypos = s->y; |
551 | 533 | ||
552 | if (s->bidir) /* scroll bidirectional */ | 534 | if (s->bidir) /* scroll bidirectional */ |
553 | { | 535 | { |