From aec37aa5fe371ed55b6553bc73c469d451e56179 Mon Sep 17 00:00:00 2001 From: Maurus Cuelenaere Date: Mon, 25 May 2009 11:12:27 +0000 Subject: * read_bmp_*(): add FORMAT_RETURN_SIZE * Lua: add luaL_checkboolean() & luaL_optboolean() * Lua: add read_bmp_file git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21074 a1c6a512-1295-4272-9138-f99709370657 --- apps/recorder/bmp.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'apps/recorder') diff --git a/apps/recorder/bmp.c b/apps/recorder/bmp.c index eef425fb25..4968d6221a 100644 --- a/apps/recorder/bmp.c +++ b/apps/recorder/bmp.c @@ -460,6 +460,7 @@ int read_bmp_fd(int fd, int read_width; int depth, numcolors, compression, totalsize; int ret; + bool return_size = format & FORMAT_RETURN_SIZE; unsigned char *bitmap = bm->data; struct uint8_rgb palette[256]; @@ -595,6 +596,9 @@ int read_bmp_fd(int fd, else totalsize = BM_SIZE(bm->width,bm->height,format,remote); + if(return_size) + return totalsize; + /* Check if this fits the buffer */ if (totalsize > maxsize) { DEBUGF("read_bmp_fd: Bitmap too large for buffer: " -- cgit v1.2.3