diff options
author | Jens Arnold <amiconn@rockbox.org> | 2005-07-07 21:03:58 +0000 |
---|---|---|
committer | Jens Arnold <amiconn@rockbox.org> | 2005-07-07 21:03:58 +0000 |
commit | 3a5bd7acb677a37d8662f7ce0c9a392d0d75da18 (patch) | |
tree | 4d288fdbeb130dce3af39e03444386fcea3b7e45 /firmware/drivers/lcd-recorder.c | |
parent | 81b32e093178d9de3b63e8ea571e5df6a65497ff (diff) | |
download | rockbox-3a5bd7acb677a37d8662f7ce0c9a392d0d75da18.tar.gz rockbox-3a5bd7acb677a37d8662f7ce0c9a392d0d75da18.zip |
Enabled scrolling on the remote LCD in the simulator. Some small shortcuts in the H1x0 remote LCD driver and the recorder LCD driver.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7057 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/drivers/lcd-recorder.c')
-rw-r--r-- | firmware/drivers/lcd-recorder.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/firmware/drivers/lcd-recorder.c b/firmware/drivers/lcd-recorder.c index 37a15961d5..b3696d7db5 100644 --- a/firmware/drivers/lcd-recorder.c +++ b/firmware/drivers/lcd-recorder.c | |||
@@ -885,7 +885,7 @@ void lcd_putsxy(int x, int y, const unsigned char *str) | |||
885 | void lcd_puts_style(int x, int y, const unsigned char *str, int style) | 885 | void lcd_puts_style(int x, int y, const unsigned char *str, int style) |
886 | { | 886 | { |
887 | int xpos,ypos,w,h; | 887 | int xpos,ypos,w,h; |
888 | int lastmode = lcd_get_drawmode(); | 888 | int lastmode = drawmode; |
889 | 889 | ||
890 | /* make sure scrolling is turned off on the line we are updating */ | 890 | /* make sure scrolling is turned off on the line we are updating */ |
891 | scrolling_lines &= ~(1 << y); | 891 | scrolling_lines &= ~(1 << y); |
@@ -897,14 +897,14 @@ void lcd_puts_style(int x, int y, const unsigned char *str, int style) | |||
897 | xpos = xmargin + x*w / strlen(str); | 897 | xpos = xmargin + x*w / strlen(str); |
898 | ypos = ymargin + y*h; | 898 | ypos = ymargin + y*h; |
899 | lcd_putsxy(xpos, ypos, str); | 899 | lcd_putsxy(xpos, ypos, str); |
900 | lcd_set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID); | 900 | drawmode = (DRMODE_SOLID|DRMODE_INVERSEVID); |
901 | lcd_fillrect(xpos + w, ypos, LCD_WIDTH - (xpos + w), h); | 901 | lcd_fillrect(xpos + w, ypos, LCD_WIDTH - (xpos + w), h); |
902 | if (style & STYLE_INVERT) | 902 | if (style & STYLE_INVERT) |
903 | { | 903 | { |
904 | lcd_set_drawmode(DRMODE_COMPLEMENT); | 904 | drawmode = DRMODE_COMPLEMENT; |
905 | lcd_fillrect(xpos, ypos, LCD_WIDTH - xpos, h); | 905 | lcd_fillrect(xpos, ypos, LCD_WIDTH - xpos, h); |
906 | } | 906 | } |
907 | lcd_set_drawmode(lastmode); | 907 | drawmode = lastmode; |
908 | } | 908 | } |
909 | 909 | ||
910 | /* put a string at a given char position */ | 910 | /* put a string at a given char position */ |
@@ -1066,17 +1066,17 @@ static void scroll_thread(void) | |||
1066 | s->offset %= s->width; | 1066 | s->offset %= s->width; |
1067 | } | 1067 | } |
1068 | 1068 | ||
1069 | lastmode = lcd_get_drawmode(); | 1069 | lastmode = drawmode; |
1070 | lcd_set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID); | 1070 | drawmode = (DRMODE_SOLID|DRMODE_INVERSEVID); |
1071 | lcd_fillrect(xpos, ypos, LCD_WIDTH - xpos, pf->height); | 1071 | lcd_fillrect(xpos, ypos, LCD_WIDTH - xpos, pf->height); |
1072 | lcd_set_drawmode(DRMODE_SOLID); | 1072 | drawmode = DRMODE_SOLID; |
1073 | lcd_putsxyofs(xpos, ypos, s->offset, s->line); | 1073 | lcd_putsxyofs(xpos, ypos, s->offset, s->line); |
1074 | if (s->invert) | 1074 | if (s->invert) |
1075 | { | 1075 | { |
1076 | lcd_set_drawmode(DRMODE_COMPLEMENT); | 1076 | drawmode = DRMODE_COMPLEMENT; |
1077 | lcd_fillrect(xpos, ypos, LCD_WIDTH - xpos, pf->height); | 1077 | lcd_fillrect(xpos, ypos, LCD_WIDTH - xpos, pf->height); |
1078 | } | 1078 | } |
1079 | lcd_set_drawmode(lastmode); | 1079 | drawmode = lastmode; |
1080 | lcd_update_rect(xpos, ypos, LCD_WIDTH - xpos, pf->height); | 1080 | lcd_update_rect(xpos, ypos, LCD_WIDTH - xpos, pf->height); |
1081 | } | 1081 | } |
1082 | 1082 | ||