summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristi Scarborough <christi@coraline.org>2006-01-31 14:29:51 +0000
committerChristi Scarborough <christi@coraline.org>2006-01-31 14:29:51 +0000
commitae0ae6d5cf85ecd578b58a37a9a1839acf88c2cb (patch)
tree4a5717e66ff077a045b5e726e7c457470faea403
parentcce79d38058efc58b2ca15ef63d06774d8487fe6 (diff)
downloadrockbox-ae0ae6d5cf85ecd578b58a37a9a1839acf88c2cb.tar.gz
rockbox-ae0ae6d5cf85ecd578b58a37a9a1839acf88c2cb.tar.bz2
rockbox-ae0ae6d5cf85ecd578b58a37a9a1839acf88c2cb.zip
Small iPod colour BMP fix by linuxstd
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8504 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/gui/gwps-common.c4
-rw-r--r--apps/recorder/bmp.c7
-rw-r--r--firmware/export/button.h6
3 files changed, 7 insertions, 10 deletions
diff --git a/apps/gui/gwps-common.c b/apps/gui/gwps-common.c
index 11e92a640d..1cda8c0f24 100644
--- a/apps/gui/gwps-common.c
+++ b/apps/gui/gwps-common.c
@@ -326,6 +326,10 @@ bool wps_data_preload_tags(struct wps_data *data, char *buf,
if (ret > 0)
{
+#if LCD_DEPTH == 16
+ if (ret % 2) ret++;
+ /* Always consume an even number of bytes */
+#endif
/* Update the image cache. */
if (bmp_cache_write && bmp_cache_fd >= 0)
{
diff --git a/apps/recorder/bmp.c b/apps/recorder/bmp.c
index e41bd2dd77..598d26ba29 100644
--- a/apps/recorder/bmp.c
+++ b/apps/recorder/bmp.c
@@ -68,11 +68,6 @@ struct rgb_quad { /* Little endian */
unsigned char reserved;
} STRUCT_PACKED;
-#ifdef ROCKBOX_LITTLE_ENDIAN
-#define readshort(x) *(x)
-#define readlong(x) *(x)
-#else
-
/* big endian functions */
static short readshort(short *value) {
unsigned char* bytes = (unsigned char*) value;
@@ -85,8 +80,6 @@ static long readlong(long *value) {
((long)bytes[2] << 16) | ((long)bytes[3] << 24);
}
-#endif
-
unsigned char brightness(struct rgb_quad color)
{
return (3 * (unsigned int)color.red + 6 * (unsigned int)color.green
diff --git a/firmware/export/button.h b/firmware/export/button.h
index c251f11890..c8d903346d 100644
--- a/firmware/export/button.h
+++ b/firmware/export/button.h
@@ -159,9 +159,9 @@ bool button_hold(void);
#define BUTTON_MENU 0x0002
#define BUTTON_PLAY 0x0004
-#define BUTTON_SELECT 0x0008
-#define BUTTON_SCROLL_FWD 0x0010
-#define BUTTON_SCROLL_BACK 0x0020
+#define BUTTON_SELECT 0x0001
+#define BUTTON_SCROLL_FWD 0x0008
+#define BUTTON_SCROLL_BACK 0x0010
#elif CONFIG_KEYPAD == IRIVER_IFP7XX_PAD