From b66477adccfd08987e409182e15bb17e70283fae Mon Sep 17 00:00:00 2001 From: Dan Everton Date: Sat, 25 Mar 2006 13:35:31 +0000 Subject: 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 --- apps/gui/icon.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'apps/gui/icon.c') diff --git a/apps/gui/icon.c b/apps/gui/icon.c index 0cdee11..ef6f61f 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 -- cgit v1.1