diff options
author | Andrew Mahone <andrew.mahone@gmail.com> | 2009-01-08 08:32:05 +0000 |
---|---|---|
committer | Andrew Mahone <andrew.mahone@gmail.com> | 2009-01-08 08:32:05 +0000 |
commit | 32d9752dcc73fd1aaa81d484c3d426ca7856b146 (patch) | |
tree | 351499c76bab38095468ea1ce2d9d64e4aabdb05 /apps/plugins/lib | |
parent | c7e83bd017e00694aecc720cf4f74ee4440eb17c (diff) | |
download | rockbox-32d9752dcc73fd1aaa81d484c3d426ca7856b146.tar.gz rockbox-32d9752dcc73fd1aaa81d484c3d426ca7856b146.zip |
remove unneeded LCD_DEPTH test in lib/resize.h, add some comments explaining the core-file imports
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19715 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/lib')
-rw-r--r-- | apps/plugins/lib/SOURCES | 4 | ||||
-rw-r--r-- | apps/plugins/lib/bmp.c | 6 | ||||
-rw-r--r-- | apps/plugins/lib/bmp.h | 7 | ||||
-rw-r--r-- | apps/plugins/lib/resize.h | 2 |
4 files changed, 14 insertions, 5 deletions
diff --git a/apps/plugins/lib/SOURCES b/apps/plugins/lib/SOURCES index b28878cffc..b55fea0620 100644 --- a/apps/plugins/lib/SOURCES +++ b/apps/plugins/lib/SOURCES | |||
@@ -4,6 +4,10 @@ fixedpoint.c | |||
4 | playback_control.c | 4 | playback_control.c |
5 | rgb_hsv.c | 5 | rgb_hsv.c |
6 | #if defined(HAVE_LCD_BITMAP) && (LCD_DEPTH < 4) | 6 | #if defined(HAVE_LCD_BITMAP) && (LCD_DEPTH < 4) |
7 | /* | ||
8 | The scaler is not provided in core on mono targets, but is built in | ||
9 | pluginlib for use with greylib overlay output | ||
10 | */ | ||
7 | #if LCD_DEPTH == 1 | 11 | #if LCD_DEPTH == 1 |
8 | resize.c | 12 | resize.c |
9 | #endif | 13 | #endif |
diff --git a/apps/plugins/lib/bmp.c b/apps/plugins/lib/bmp.c index b3e0e2b948..1cb24d3ea0 100644 --- a/apps/plugins/lib/bmp.c +++ b/apps/plugins/lib/bmp.c | |||
@@ -27,7 +27,7 @@ | |||
27 | #include "lcd.h" | 27 | #include "lcd.h" |
28 | #include "system.h" | 28 | #include "system.h" |
29 | 29 | ||
30 | #if LCD_DEPTH > 1 | 30 | #if LCD_DEPTH > 1 /* save is only available for color, resize for >1bpp */ |
31 | #ifdef HAVE_LCD_COLOR | 31 | #ifdef HAVE_LCD_COLOR |
32 | #define LE16(x) (htole16(x))&0xff, ((htole16(x))>>8)&0xff | 32 | #define LE16(x) (htole16(x))&0xff, ((htole16(x))>>8)&0xff |
33 | #define LE32(x) (htole32(x))&0xff, ((htole32(x))>>8)&0xff, ((htole32(x))>>16)&0xff, ((htole32(x))>>24)&0xff | 33 | #define LE32(x) (htole32(x))&0xff, ((htole32(x))>>8)&0xff, ((htole32(x))>>16)&0xff, ((htole32(x))>>24)&0xff |
@@ -122,13 +122,15 @@ void simple_resize_bitmap(struct bitmap *src, struct bitmap *dst) | |||
122 | } | 122 | } |
123 | } | 123 | } |
124 | 124 | ||
125 | #else | 125 | #else /* LCD_DEPTH == 1 */ |
126 | #include "wrappers.h" | 126 | #include "wrappers.h" |
127 | 127 | ||
128 | static const struct plugin_api *rb; | 128 | static const struct plugin_api *rb; |
129 | 129 | ||
130 | /* import the core bmp loader */ | ||
130 | #include "../../recorder/bmp.c" | 131 | #include "../../recorder/bmp.c" |
131 | 132 | ||
133 | /* initialize rb for use by the bmp loader */ | ||
132 | void bmp_init(const struct plugin_api *api) | 134 | void bmp_init(const struct plugin_api *api) |
133 | { | 135 | { |
134 | rb = api; | 136 | rb = api; |
diff --git a/apps/plugins/lib/bmp.h b/apps/plugins/lib/bmp.h index 379a889994..0e7a0a4933 100644 --- a/apps/plugins/lib/bmp.h +++ b/apps/plugins/lib/bmp.h | |||
@@ -24,7 +24,7 @@ | |||
24 | #include "lcd.h" | 24 | #include "lcd.h" |
25 | #include "plugin.h" | 25 | #include "plugin.h" |
26 | 26 | ||
27 | #if LCD_DEPTH > 1 | 27 | #if LCD_DEPTH > 1 /* save is only available for color, resize for >1bpp */ |
28 | #ifdef HAVE_LCD_COLOR | 28 | #ifdef HAVE_LCD_COLOR |
29 | /** | 29 | /** |
30 | * Save bitmap to file | 30 | * Save bitmap to file |
@@ -45,6 +45,11 @@ void simple_resize_bitmap(struct bitmap *src, struct bitmap *dst); | |||
45 | void smooth_resize_bitmap(struct bitmap *src, struct bitmap *dst); | 45 | void smooth_resize_bitmap(struct bitmap *src, struct bitmap *dst); |
46 | 46 | ||
47 | #else | 47 | #else |
48 | /* | ||
49 | BMP loader is built with scaling support in pluginlib on 1bpp targets, as | ||
50 | these do not provide scaling support in the core BMP loader. bmp_init is | ||
51 | needed to copy the plugin API pointer for the pluginlib loader's use. | ||
52 | */ | ||
48 | void bmp_init(const struct plugin_api *api); | 53 | void bmp_init(const struct plugin_api *api); |
49 | #endif | 54 | #endif |
50 | 55 | ||
diff --git a/apps/plugins/lib/resize.h b/apps/plugins/lib/resize.h index 3674e140c3..46a8977675 100644 --- a/apps/plugins/lib/resize.h +++ b/apps/plugins/lib/resize.h | |||
@@ -24,8 +24,6 @@ | |||
24 | #ifndef _LIB_RESIZE_H_ | 24 | #ifndef _LIB_RESIZE_H_ |
25 | #define _LIB_RESIZE_H_ | 25 | #define _LIB_RESIZE_H_ |
26 | 26 | ||
27 | #if LCD_DEPTH == 1 | ||
28 | void resize_init(const struct plugin_api *api); | 27 | void resize_init(const struct plugin_api *api); |
29 | #endif | ||
30 | 28 | ||
31 | #endif | 29 | #endif |