Undo the hacks that allowed targets without LEFT/RIGHT (UP/DN) to build.
Replaced them with warnings until they are fixed *PROPERLY* Change-Id: I4425200e60f8b5224262a54f105b974cec471d22
This commit is contained in:
parent
dc81f96fd1
commit
7a1bf01541
8 changed files with 31 additions and 18 deletions
|
@ -434,6 +434,7 @@ static inline void button_flip_horizontally(int context, int *button)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined(BUTTON_LEFT) && defined(BUTTON_RIGHT)
|
||||||
newbutton &= ~(BUTTON_LEFT | BUTTON_RIGHT);
|
newbutton &= ~(BUTTON_LEFT | BUTTON_RIGHT);
|
||||||
if (has_flag(*button, BUTTON_LEFT))
|
if (has_flag(*button, BUTTON_LEFT))
|
||||||
{
|
{
|
||||||
|
@ -444,6 +445,10 @@ static inline void button_flip_horizontally(int context, int *button)
|
||||||
{
|
{
|
||||||
newbutton |= BUTTON_LEFT;
|
newbutton |= BUTTON_LEFT;
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
#warning "BUTTON_LEFT / BUTTON_RIGHT not defined!"
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef SIMULATOR
|
#ifndef SIMULATOR
|
||||||
#ifdef HAVE_SCROLLWHEEL
|
#ifdef HAVE_SCROLLWHEEL
|
||||||
newbutton &= ~(BUTTON_SCROLL_BACK | BUTTON_SCROLL_FWD);
|
newbutton &= ~(BUTTON_SCROLL_BACK | BUTTON_SCROLL_FWD);
|
||||||
|
|
|
@ -80,7 +80,7 @@ const struct button_mapping pf_context_album_scroll[] =
|
||||||
{PF_PREV_REPEAT, BUTTON_RC_REW|BUTTON_REPEAT,BUTTON_NONE},
|
{PF_PREV_REPEAT, BUTTON_RC_REW|BUTTON_REPEAT,BUTTON_NONE},
|
||||||
{PF_NEXT, BUTTON_RC_FF, BUTTON_NONE},
|
{PF_NEXT, BUTTON_RC_FF, BUTTON_NONE},
|
||||||
{PF_NEXT_REPEAT, BUTTON_RC_FF|BUTTON_REPEAT, BUTTON_NONE},
|
{PF_NEXT_REPEAT, BUTTON_RC_FF|BUTTON_REPEAT, BUTTON_NONE},
|
||||||
#else
|
#elif defined(BUTTON_LEFT) && defined(BUTTON_RIGHT)
|
||||||
{PF_PREV, BUTTON_LEFT, BUTTON_NONE},
|
{PF_PREV, BUTTON_LEFT, BUTTON_NONE},
|
||||||
{PF_PREV_REPEAT, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE},
|
{PF_PREV_REPEAT, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE},
|
||||||
{PF_NEXT, BUTTON_RIGHT, BUTTON_NONE},
|
{PF_NEXT, BUTTON_RIGHT, BUTTON_NONE},
|
||||||
|
@ -89,6 +89,8 @@ const struct button_mapping pf_context_album_scroll[] =
|
||||||
{ACTION_NONE, BUTTON_RIGHT|BUTTON_REL, BUTTON_RIGHT},
|
{ACTION_NONE, BUTTON_RIGHT|BUTTON_REL, BUTTON_RIGHT},
|
||||||
{ACTION_NONE, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_LEFT},
|
{ACTION_NONE, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_LEFT},
|
||||||
{ACTION_NONE, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_RIGHT},
|
{ACTION_NONE, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_RIGHT},
|
||||||
|
#else
|
||||||
|
#warning "LEFT/RIGHT not defined!"
|
||||||
#endif
|
#endif
|
||||||
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_PLUGIN|1)
|
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_PLUGIN|1)
|
||||||
};
|
};
|
||||||
|
|
|
@ -85,9 +85,11 @@ static void setoptions (void)
|
||||||
#ifdef HAVE_TOUCHSCREEN
|
#ifdef HAVE_TOUCHSCREEN
|
||||||
options.LEFT = BUTTON_MIDLEFT;
|
options.LEFT = BUTTON_MIDLEFT;
|
||||||
options.RIGHT = BUTTON_MIDRIGHT;
|
options.RIGHT = BUTTON_MIDRIGHT;
|
||||||
#else
|
#elif defined(BUTTON_LEFT) && defined(BUTTON_RIGHT)
|
||||||
options.LEFT = BUTTON_LEFT;
|
options.LEFT = BUTTON_LEFT;
|
||||||
options.RIGHT = BUTTON_RIGHT;
|
options.RIGHT = BUTTON_RIGHT;
|
||||||
|
#else
|
||||||
|
#warning "LEFT/RIGHT not defined!"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if CONFIG_KEYPAD == IRIVER_H100_PAD
|
#if CONFIG_KEYPAD == IRIVER_H100_PAD
|
||||||
|
|
|
@ -558,15 +558,20 @@ void button_close(void)
|
||||||
|
|
||||||
#ifdef HAVE_LCD_FLIP
|
#ifdef HAVE_LCD_FLIP
|
||||||
/*
|
/*
|
||||||
* helper function to swap LEFT/RIGHT, UP/DOWN (if present), and F1/F3 (Recorder)
|
* helper function to swap LEFT/RIGHT, UP/DOWN (if present)
|
||||||
*/
|
*/
|
||||||
static int button_flip(int button)
|
static int button_flip(int button)
|
||||||
{
|
{
|
||||||
int newbutton = button;
|
int newbutton = button;
|
||||||
|
|
||||||
#if (CONFIG_PLATFORM & PLATFORM_NATIVE)
|
#if (CONFIG_PLATFORM & PLATFORM_NATIVE)
|
||||||
newbutton &=
|
newbutton &= ~(
|
||||||
~(BUTTON_LEFT | BUTTON_RIGHT
|
#if defined(BUTTON_LEFT) && defined(BUTTON_RIGHT)
|
||||||
|
BUTTON_LEFT | BUTTON_RIGHT
|
||||||
|
#else
|
||||||
|
#warning "LEFT/RIGHT not defined!"
|
||||||
|
0
|
||||||
|
#endif
|
||||||
#if defined(BUTTON_UP) && defined(BUTTON_DOWN)
|
#if defined(BUTTON_UP) && defined(BUTTON_DOWN)
|
||||||
| BUTTON_UP | BUTTON_DOWN
|
| BUTTON_UP | BUTTON_DOWN
|
||||||
#endif
|
#endif
|
||||||
|
@ -583,10 +588,15 @@ static int button_flip(int button)
|
||||||
#endif
|
#endif
|
||||||
);
|
);
|
||||||
|
|
||||||
|
#if defined(BUTTON_LEFT) && defined(BUTTON_RIGHT)
|
||||||
if (button & BUTTON_LEFT)
|
if (button & BUTTON_LEFT)
|
||||||
newbutton |= BUTTON_RIGHT;
|
newbutton |= BUTTON_RIGHT;
|
||||||
if (button & BUTTON_RIGHT)
|
if (button & BUTTON_RIGHT)
|
||||||
newbutton |= BUTTON_LEFT;
|
newbutton |= BUTTON_LEFT;
|
||||||
|
#else
|
||||||
|
#warning "LEFT/RIGHT not defined!"
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(BUTTON_UP) && defined(BUTTON_DOWN)
|
#if defined(BUTTON_UP) && defined(BUTTON_DOWN)
|
||||||
if (button & BUTTON_UP)
|
if (button & BUTTON_UP)
|
||||||
newbutton |= BUTTON_DOWN;
|
newbutton |= BUTTON_DOWN;
|
||||||
|
|
|
@ -32,8 +32,8 @@
|
||||||
#define BUTTON_VOL_UP 0x00000020
|
#define BUTTON_VOL_UP 0x00000020
|
||||||
#define BUTTON_VOL_DOWN 0x00000040
|
#define BUTTON_VOL_DOWN 0x00000040
|
||||||
|
|
||||||
#define BUTTON_LEFT 0
|
#define BUTTON_LEFT BUTTON_PREV
|
||||||
#define BUTTON_RIGHT 0
|
#define BUTTON_RIGHT BUTTON_NEXT
|
||||||
|
|
||||||
#define BUTTON_MAIN (BUTTON_POWER | BUTTON_HOME | BUTTON_PREV | BUTTON_NEXT | \
|
#define BUTTON_MAIN (BUTTON_POWER | BUTTON_HOME | BUTTON_PREV | BUTTON_NEXT | \
|
||||||
BUTTON_PLAY | BUTTON_VOL_UP | BUTTON_VOL_DOWN)
|
BUTTON_PLAY | BUTTON_VOL_UP | BUTTON_VOL_DOWN)
|
||||||
|
|
|
@ -28,10 +28,6 @@
|
||||||
#define BUTTON_MENU 0x00000002
|
#define BUTTON_MENU 0x00000002
|
||||||
#define BUTTON_PLAY 0x00000004
|
#define BUTTON_PLAY 0x00000004
|
||||||
|
|
||||||
/* there are no LEFT/RIGHT buttons, but other parts of the code expect them */
|
|
||||||
#define BUTTON_LEFT 0
|
|
||||||
#define BUTTON_RIGHT 0
|
|
||||||
|
|
||||||
#define BUTTON_MAIN (BUTTON_PREVNEXT|BUTTON_MENU|BUTTON_PLAY)
|
#define BUTTON_MAIN (BUTTON_PREVNEXT|BUTTON_MENU|BUTTON_PLAY)
|
||||||
|
|
||||||
#define POWEROFF_BUTTON BUTTON_PLAY
|
#define POWEROFF_BUTTON BUTTON_PLAY
|
||||||
|
|
|
@ -32,11 +32,8 @@
|
||||||
#define BUTTON_REWIND 0x00000020
|
#define BUTTON_REWIND 0x00000020
|
||||||
#define BUTTON_FAST_FWD 0x00000040
|
#define BUTTON_FAST_FWD 0x00000040
|
||||||
|
|
||||||
/* Compatibility hacks for flipping. Needs a somewhat better fix. */
|
#define BUTTON_LEFT BUTTON_REWIND
|
||||||
#define BUTTON_LEFT 0
|
#define BUTTON_RIGHT BUTTON_FAST_FWD
|
||||||
#define BUTTON_RIGHT 0
|
|
||||||
#define BUTTON_UP 0
|
|
||||||
#define BUTTON_DOWN 0
|
|
||||||
|
|
||||||
#define BUTTON_MAIN (BUTTON_SELECT | BUTTON_VOL_UP | BUTTON_VOL_DOWN | BUTTON_MENU \
|
#define BUTTON_MAIN (BUTTON_SELECT | BUTTON_VOL_UP | BUTTON_VOL_DOWN | BUTTON_MENU \
|
||||||
BUTTON_MENU | BUTTON_BACK | BUTTON_REWIND | BUTTON_FAST_FWD)
|
BUTTON_MENU | BUTTON_BACK | BUTTON_REWIND | BUTTON_FAST_FWD)
|
||||||
|
|
|
@ -33,12 +33,13 @@
|
||||||
#define BUTTON_VOL_UP 0x00000040
|
#define BUTTON_VOL_UP 0x00000040
|
||||||
#define BUTTON_VOL_DOWN 0x00000080
|
#define BUTTON_VOL_DOWN 0x00000080
|
||||||
#define BUTTON_PWRALT 0x00000100 /* BUTTON_POWER combo with other buttons */
|
#define BUTTON_PWRALT 0x00000100 /* BUTTON_POWER combo with other buttons */
|
||||||
#define BUTTON_LEFT 0
|
|
||||||
#define BUTTON_RIGHT 0
|
|
||||||
|
|
||||||
#define BUTTON_MAIN (BUTTON_POWER | BUTTON_HOME | BUTTON_OPTION | BUTTON_PREV | \
|
#define BUTTON_MAIN (BUTTON_POWER | BUTTON_HOME | BUTTON_OPTION | BUTTON_PREV | \
|
||||||
BUTTON_NEXT | BUTTON_PLAY | BUTTON_VOL_UP | BUTTON_VOL_DOWN)
|
BUTTON_NEXT | BUTTON_PLAY | BUTTON_VOL_UP | BUTTON_VOL_DOWN)
|
||||||
|
|
||||||
|
#define BUTTON_LEFT BUTTON_PREV
|
||||||
|
#define BUTTON_RIGHT BUTTON_NEXT
|
||||||
|
|
||||||
/* Software power-off */
|
/* Software power-off */
|
||||||
#define POWEROFF_BUTTON BUTTON_POWER
|
#define POWEROFF_BUTTON BUTTON_POWER
|
||||||
#define POWEROFF_COUNT 10
|
#define POWEROFF_COUNT 10
|
||||||
|
|
Loading…
Reference in a new issue