forked from len0rd/rockbox
Small iPod colour BMP fix by linuxstd
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8504 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
cce79d3805
commit
ae0ae6d5cf
3 changed files with 7 additions and 10 deletions
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue