From e3b1d78dfc06ec69248558630d3a4afd7c1ec9c2 Mon Sep 17 00:00:00 2001 From: Andrew Mahone Date: Sat, 9 May 2009 10:10:26 +0000 Subject: Fix test for direct JPEG output, bump plugin API as r20884 changed struct custom_format. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20885 a1c6a512-1295-4272-9138-f99709370657 --- apps/plugin.h | 4 ++-- apps/recorder/jpeg_load.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'apps') diff --git a/apps/plugin.h b/apps/plugin.h index d017d6394d..5efe3fe00c 100644 --- a/apps/plugin.h +++ b/apps/plugin.h @@ -129,12 +129,12 @@ void* plugin_get_buffer(size_t *buffer_size); #define PLUGIN_MAGIC 0x526F634B /* RocK */ /* increase this every time the api struct changes */ -#define PLUGIN_API_VERSION 150 +#define PLUGIN_API_VERSION 151 /* update this to latest version if a change to the api struct breaks backwards compatibility (and please take the opportunity to sort in any new function which are "waiting" at the end of the function table) */ -#define PLUGIN_MIN_API_VERSION 150 +#define PLUGIN_MIN_API_VERSION 151 /* plugin return codes */ enum plugin_status { diff --git a/apps/recorder/jpeg_load.c b/apps/recorder/jpeg_load.c index 9393e60de8..177e7c098c 100644 --- a/apps/recorder/jpeg_load.c +++ b/apps/recorder/jpeg_load.c @@ -2032,8 +2032,8 @@ int read_jpeg_fd(int fd, } p_jpeg->h_scale[0] = calc_scale(p_jpeg->x_size, bm->width); p_jpeg->v_scale[0] = calc_scale(p_jpeg->y_size, bm->height); - if ((p_jpeg->x_size << p_jpeg->h_scale[0]) >> 3 && - (p_jpeg->y_size << p_jpeg->v_scale[0]) >> 3) + if ((p_jpeg->x_size << p_jpeg->h_scale[0]) >> 3 == bm->width && + (p_jpeg->y_size << p_jpeg->v_scale[0]) >> 3 == bm->height) resize = false; #ifdef HAVE_LCD_COLOR p_jpeg->h_scale[1] = p_jpeg->h_scale[0] + -- cgit v1.2.3