From 696d94547b561c3f06881526afa26065d423daa4 Mon Sep 17 00:00:00 2001 From: unhelpful Date: Sat, 2 May 2009 02:39:13 +0000 Subject: [PATCH] Add read_jpeg_* to feature_wrappers.h, add import-from-core for jpeg_load.c on mono targets. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20839 a1c6a512-1295-4272-9138-f99709370657 --- apps/plugins/lib/SOURCES | 1 + apps/plugins/lib/feature_wrappers.h | 2 ++ .../{feature_wrappers.h => pluginlib_jpeg_load.c} | 30 +++------------------- 3 files changed, 7 insertions(+), 26 deletions(-) copy apps/plugins/lib/{feature_wrappers.h => pluginlib_jpeg_load.c} (50%) diff --git a/apps/plugins/lib/SOURCES b/apps/plugins/lib/SOURCES index ba8956a8e..7dda416a8 100644 --- a/apps/plugins/lib/SOURCES +++ b/apps/plugins/lib/SOURCES @@ -12,6 +12,7 @@ buflib.c */ #if LCD_DEPTH == 1 pluginlib_resize.c +pluginlib_jpeg_load.c #endif grey_core.c grey_draw.c diff --git a/apps/plugins/lib/feature_wrappers.h b/apps/plugins/lib/feature_wrappers.h index 52750acb6..22ce779fc 100644 --- a/apps/plugins/lib/feature_wrappers.h +++ b/apps/plugins/lib/feature_wrappers.h @@ -32,6 +32,8 @@ */ #ifdef HAVE_ALBUMART #define search_albumart_files rb->search_albumart_files +#define read_jpeg_file rb->read_jpeg_file +#define read_jpeg_fd rb->read_jpeg_fd #endif /* This should only be used when loading scaled bitmaps, or using custom output diff --git a/apps/plugins/lib/feature_wrappers.h b/apps/plugins/lib/pluginlib_jpeg_load.c similarity index 50% copy from apps/plugins/lib/feature_wrappers.h copy to apps/plugins/lib/pluginlib_jpeg_load.c index 52750acb6..fdf1f939e 100644 --- a/apps/plugins/lib/feature_wrappers.h +++ b/apps/plugins/lib/pluginlib_jpeg_load.c @@ -9,9 +9,7 @@ * * Copyright (C) 2009 by Andrew Mahone * -* This defines wrappers for some features which are used differently depending -* on how the target was built, primarily because of core features being accesed -* via pluginlib on targets where they are missing from core. +* This is a wrapper for the core jpeg_load.c * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -23,27 +21,7 @@ * ****************************************************************************/ -#ifndef _LIB_FEATURE_WRAPPERS_H_ -#define _LIB_FEATURE_WRAPPERS_H_ - -/* search_albumart_files is only available in core with HAVE_ALBUMART defined, - * but can easily be implement in pluginlib as long as the database is - * available. - */ -#ifdef HAVE_ALBUMART -#define search_albumart_files rb->search_albumart_files -#endif - -/* This should only be used when loading scaled bitmaps, or using custom output - * plugins. The pluginlib loader does not support loading bitmaps unscaled in - * native format, so rb->read_bmp_file should always be used directly to load - * such images. - */ -#if LCD_DEPTH > 1 -#define scaled_read_bmp_file rb->read_bmp_file -#else -#define scaled_read_bmp_file read_bmp_file -#endif - -#endif +#include +#include "wrappers.h" +#include "../../recorder/jpeg_load.c" -- 2.11.4.GIT