summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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,
326 326
327 if (ret > 0) 327 if (ret > 0)
328 { 328 {
329#if LCD_DEPTH == 16
330 if (ret % 2) ret++;
331 /* Always consume an even number of bytes */
332#endif
329 /* Update the image cache. */ 333 /* Update the image cache. */
330 if (bmp_cache_write && bmp_cache_fd >= 0) 334 if (bmp_cache_write && bmp_cache_fd >= 0)
331 { 335 {
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 */
68 unsigned char reserved; 68 unsigned char reserved;
69} STRUCT_PACKED; 69} STRUCT_PACKED;
70 70
71#ifdef ROCKBOX_LITTLE_ENDIAN
72#define readshort(x) *(x)
73#define readlong(x) *(x)
74#else
75
76/* big endian functions */ 71/* big endian functions */
77static short readshort(short *value) { 72static short readshort(short *value) {
78 unsigned char* bytes = (unsigned char*) value; 73 unsigned char* bytes = (unsigned char*) value;
@@ -85,8 +80,6 @@ static long readlong(long *value) {
85 ((long)bytes[2] << 16) | ((long)bytes[3] << 24); 80 ((long)bytes[2] << 16) | ((long)bytes[3] << 24);
86} 81}
87 82
88#endif
89
90unsigned char brightness(struct rgb_quad color) 83unsigned char brightness(struct rgb_quad color)
91{ 84{
92 return (3 * (unsigned int)color.red + 6 * (unsigned int)color.green 85 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);
159 159
160#define BUTTON_MENU 0x0002 160#define BUTTON_MENU 0x0002
161#define BUTTON_PLAY 0x0004 161#define BUTTON_PLAY 0x0004
162#define BUTTON_SELECT 0x0008 162#define BUTTON_SELECT 0x0001
163#define BUTTON_SCROLL_FWD 0x0010 163#define BUTTON_SCROLL_FWD 0x0008
164#define BUTTON_SCROLL_BACK 0x0020 164#define BUTTON_SCROLL_BACK 0x0010
165 165
166#elif CONFIG_KEYPAD == IRIVER_IFP7XX_PAD 166#elif CONFIG_KEYPAD == IRIVER_IFP7XX_PAD
167 167