diff options
author | Björn Stenberg <bjorn@haxx.se> | 2002-10-01 08:51:47 +0000 |
---|---|---|
committer | Björn Stenberg <bjorn@haxx.se> | 2002-10-01 08:51:47 +0000 |
commit | 8fcdede340b3ba40465cb18f7606b97e02a90230 (patch) | |
tree | 5d2d932407be2d69a0d02f6996ec990d129642f7 /firmware | |
parent | 44ee3f6bfb9c891346d74ee09bf36d6729f1301d (diff) | |
download | rockbox-8fcdede340b3ba40465cb18f7606b97e02a90230.tar.gz rockbox-8fcdede340b3ba40465cb18f7606b97e02a90230.zip |
Support getting width OR height of string
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@2461 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware')
-rw-r--r-- | firmware/drivers/lcd-recorder.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/firmware/drivers/lcd-recorder.c b/firmware/drivers/lcd-recorder.c index a5d8900f5d..25497723ba 100644 --- a/firmware/drivers/lcd-recorder.c +++ b/firmware/drivers/lcd-recorder.c | |||
@@ -244,8 +244,10 @@ int lcd_getstringsize(unsigned char *str, int *w, int *h) | |||
244 | /* get proportional width and glyph bits*/ | 244 | /* get proportional width and glyph bits*/ |
245 | width += pf->width? pf->width[ch]: pf->maxwidth; | 245 | width += pf->width? pf->width[ch]: pf->maxwidth; |
246 | } | 246 | } |
247 | *w = width; | 247 | if ( w ) |
248 | *h = pf->height; | 248 | *w = width; |
249 | if ( h ) | ||
250 | *h = pf->height; | ||
249 | 251 | ||
250 | return width; | 252 | return width; |
251 | } | 253 | } |