summaryrefslogtreecommitdiff
path: root/firmware/drivers
diff options
context:
space:
mode:
authorBjörn Stenberg <bjorn@haxx.se>2002-10-01 08:51:47 +0000
committerBjörn Stenberg <bjorn@haxx.se>2002-10-01 08:51:47 +0000
commit8fcdede340b3ba40465cb18f7606b97e02a90230 (patch)
tree5d2d932407be2d69a0d02f6996ec990d129642f7 /firmware/drivers
parent44ee3f6bfb9c891346d74ee09bf36d6729f1301d (diff)
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/drivers')
-rw-r--r--firmware/drivers/lcd-recorder.c6
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)
/* get proportional width and glyph bits*/
width += pf->width? pf->width[ch]: pf->maxwidth;
}
- *w = width;
- *h = pf->height;
+ if ( w )
+ *w = width;
+ if ( h )
+ *h = pf->height;
return width;
}