1
0
Fork 0
forked from len0rd/rockbox

Support getting width OR height of string

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@2461 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Björn Stenberg 2002-10-01 08:51:47 +00:00
parent 44ee3f6bfb
commit 8fcdede340

View file

@ -244,8 +244,10 @@ int lcd_getstringsize(unsigned char *str, int *w, int *h)
/* get proportional width and glyph bits*/ /* get proportional width and glyph bits*/
width += pf->width? pf->width[ch]: pf->maxwidth; width += pf->width? pf->width[ch]: pf->maxwidth;
} }
*w = width; if ( w )
*h = pf->height; *w = width;
if ( h )
*h = pf->height;
return width; return width;
} }