diff options
author | Dan Everton <dan@iocaine.org> | 2006-03-25 13:35:31 +0000 |
---|---|---|
committer | Dan Everton <dan@iocaine.org> | 2006-03-25 13:35:31 +0000 |
commit | b66477adccfd08987e409182e15bb17e70283fae (patch) | |
tree | 46861838424afed2c2d7a6e41d429064d08f0e45 /apps/gui | |
parent | 2b71fa855d57c1dcd19411882d545002603a9dc3 (diff) |
Support the recording screen on the LCD remote. Also adds support for the peakmeter in the rremote WPS. Patch from Martin Scarratt (task 4818).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9246 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/gui')
-rw-r--r-- | apps/gui/gwps-common.c | 8 | ||||
-rw-r--r-- | apps/gui/icon.c | 8 |
2 files changed, 9 insertions, 7 deletions
diff --git a/apps/gui/gwps-common.c b/apps/gui/gwps-common.c index b250674d47..37306fb0e3 100644 --- a/apps/gui/gwps-common.c +++ b/apps/gui/gwps-common.c @@ -1750,7 +1750,7 @@ bool gui_wps_refresh(struct gui_wps *gwps, int ffwd_offset, #endif update_line = true; } - if (flags & refresh_mode & WPS_REFRESH_PEAK_METER && display->height >= LCD_HEIGHT) { + if (flags & refresh_mode & WPS_REFRESH_PEAK_METER) { /* peak meter */ int peak_meter_y; @@ -1761,12 +1761,12 @@ bool gui_wps_refresh(struct gui_wps *gwps, int ffwd_offset, line so that it is only displayed if no status bar is visible. If so we neither want do draw nor enable the peak meter. */ - if (peak_meter_y + h <= LCD_HEIGHT) { + if (peak_meter_y + h <= display->height) { /* found a line with a peak meter -> remember that we must enable it later */ enable_pm = true; - peak_meter_draw(0, peak_meter_y, LCD_WIDTH, - MIN(h, LCD_HEIGHT - peak_meter_y)); + peak_meter_screen(gwps->display, 0, peak_meter_y, + MIN(h, display->height - peak_meter_y)); } } #else diff --git a/apps/gui/icon.c b/apps/gui/icon.c index 0cdee11b8e..ef6f61f94e 100644 --- a/apps/gui/icon.c +++ b/apps/gui/icon.c @@ -26,12 +26,14 @@ void screen_put_iconxy(struct screen * display, int x, int y, ICON icon) { #ifdef HAVE_LCD_BITMAP + int width, height; int xpos, ypos; + display->getstringsize((unsigned char *)"M", &width, &height); xpos = x*CURSOR_WIDTH; - ypos = y*display->char_height + display->getymargin(); + ypos = y*height + display->getymargin(); - if ( display->char_height > CURSOR_HEIGHT )/* center the cursor */ - ypos += (display->char_height - CURSOR_HEIGHT) / 2; + if ( height > CURSOR_HEIGHT )/* center the cursor */ + ypos += (height - CURSOR_HEIGHT) / 2; if(icon==0)/* Don't display invalid icons */ screen_clear_area(display, xpos, ypos, CURSOR_WIDTH, CURSOR_HEIGHT); else |