Fix red of r22852

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22853 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Tomer Shalev 2009-09-30 10:32:21 +00:00
parent 8c5141b32e
commit 7d22099f2b
5 changed files with 67 additions and 17 deletions

View file

@ -474,8 +474,8 @@ static const struct button_mapping button_context_usb_hid[] = {
{ ACTION_USB_HID_INC, BUTTON_VOL_UP|BUTTON_REPEAT, BUTTON_NONE },
{ ACTION_USB_HID_DEC, BUTTON_VOL_DOWN, BUTTON_NONE },
{ ACTION_USB_HID_DEC, BUTTON_VOL_DOWN|BUTTON_REPEAT, BUTTON_NONE },
{ ACTION_USB_HID_START, BUTTON_PLAY|BUTTON_REL, BUTTON_START },
{ ACTION_USB_HID_START_LONG, BUTTON_PLAY|BUTTON_REPEAT, BUTTON_START },
{ ACTION_USB_HID_START, BUTTON_PLAY|BUTTON_REL, BUTTON_PLAY },
{ ACTION_USB_HID_START_LONG, BUTTON_PLAY|BUTTON_REPEAT, BUTTON_PLAY },
{ ACTION_USB_HID_QUIT, BUTTON_MENU|BUTTON_REL, BUTTON_MENU },
{ ACTION_USB_HID_QUIT_LONG, BUTTON_MENU|BUTTON_REPEAT, BUTTON_MENU },
{ ACTION_USB_HID_LEFT, BUTTON_LEFT|BUTTON_REL, BUTTON_LEFT },

View file

@ -317,20 +317,71 @@ static const struct button_mapping remote_button_context_tree[] = {
#ifdef USB_ENABLE_HID
static const struct button_mapping button_context_usb_hid[] = {
{ ACTION_USB_HID_PLAY, BUTTON_PLAY, BUTTON_NONE },
{ ACTION_USB_HID_STOP, BUTTON_POWER, BUTTON_NONE },
{ ACTION_USB_HID_SKIPPREV, BUTTON_LEFT, BUTTON_NONE },
{ ACTION_USB_HID_SKIPNEXT, BUTTON_RIGHT, BUTTON_NONE },
{ ACTION_USB_HID_VOLUP, BUTTON_UP, BUTTON_NONE },
{ ACTION_USB_HID_VOLUP, BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE },
{ ACTION_USB_HID_VOLDOWN, BUTTON_DOWN, BUTTON_NONE },
{ ACTION_USB_HID_VOLDOWN, BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE },
{ ACTION_USB_HID_MUTE, BUTTON_SELECT, BUTTON_NONE },
{ ACTION_USB_HID_MENU, BUTTON_MENU, BUTTON_NONE },
{ ACTION_USB_HID_INC, BUTTON_UP, BUTTON_NONE },
{ ACTION_USB_HID_INC, BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE },
{ ACTION_USB_HID_DEC, BUTTON_DOWN, BUTTON_NONE },
{ ACTION_USB_HID_DEC, BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE },
{ ACTION_USB_HID_START, BUTTON_PLAY|BUTTON_REL, BUTTON_PLAY },
{ ACTION_USB_HID_START_LONG, BUTTON_PLAY|BUTTON_REPEAT, BUTTON_PLAY },
{ ACTION_USB_HID_QUIT, BUTTON_DISPLAY|BUTTON_REL, BUTTON_DISPLAY },
{ ACTION_USB_HID_QUIT_LONG, BUTTON_DISPLAY|BUTTON_REPEAT, BUTTON_DISPLAY },
{ ACTION_USB_HID_LEFT, BUTTON_LEFT|BUTTON_REL, BUTTON_LEFT },
{ ACTION_USB_HID_LEFT_LONG, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_LEFT },
{ ACTION_USB_HID_RIGHT, BUTTON_RIGHT|BUTTON_REL, BUTTON_RIGHT },
{ ACTION_USB_HID_RIGHT_LONG, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_RIGHT },
{ ACTION_USB_HID_SELECT, BUTTON_SELECT|BUTTON_REL, BUTTON_SELECT },
{ ACTION_USB_HID_SELECT_LONG, BUTTON_SELECT|BUTTON_REPEAT, BUTTON_SELECT },
{ ACTION_USB_HID_MENU, BUTTON_DOWN|BUTTON_REL, BUTTON_DOWN },
{ ACTION_USB_HID_MENU_LONG, BUTTON_DOWN|BUTTON_REPEAT, BUTTON_DOWN },
{ ACTION_USB_HID_MODE, BUTTON_POWER|BUTTON_REL, BUTTON_POWER },
{ ACTION_USB_HID_MODE_LONG, BUTTON_POWER|BUTTON_REPEAT, BUTTON_POWER },
LAST_ITEM_IN_LIST
}; /* button_context_usb_hid */
static const struct button_mapping button_context_usb_hid_mouse[] = {
{ ACTION_USB_HID_MOUSE_UP, BUTTON_UP, BUTTON_NONE },
{ ACTION_USB_HID_MOUSE_UP_REP, BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE },
{ ACTION_USB_HID_MOUSE_DOWN, BUTTON_DOWN, BUTTON_NONE },
{ ACTION_USB_HID_MOUSE_DOWN_REP, BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE },
{ ACTION_USB_HID_MOUSE_LEFT, BUTTON_LEFT, BUTTON_NONE },
{ ACTION_USB_HID_MOUSE_LEFT_REP, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE },
{ ACTION_USB_HID_MOUSE_RIGHT, BUTTON_RIGHT, BUTTON_NONE },
{ ACTION_USB_HID_MOUSE_RIGHT_REP, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE },
{ ACTION_USB_HID_MOUSE_LDRAG_UP, BUTTON_SELECT|BUTTON_UP, BUTTON_NONE },
{ ACTION_USB_HID_MOUSE_LDRAG_UP, BUTTON_MENU|BUTTON_UP, BUTTON_NONE },
{ ACTION_USB_HID_MOUSE_LDRAG_UP_REP, BUTTON_SELECT|BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE },
{ ACTION_USB_HID_MOUSE_LDRAG_UP_REP, BUTTON_MENU|BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE },
{ ACTION_USB_HID_MOUSE_LDRAG_DOWN, BUTTON_SELECT|BUTTON_DOWN, BUTTON_NONE },
{ ACTION_USB_HID_MOUSE_LDRAG_DOWN, BUTTON_MENU|BUTTON_DOWN, BUTTON_NONE },
{ ACTION_USB_HID_MOUSE_LDRAG_DOWN_REP, BUTTON_SELECT|BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE },
{ ACTION_USB_HID_MOUSE_LDRAG_DOWN_REP, BUTTON_MENU|BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE },
{ ACTION_USB_HID_MOUSE_LDRAG_LEFT, BUTTON_SELECT|BUTTON_LEFT, BUTTON_NONE },
{ ACTION_USB_HID_MOUSE_LDRAG_LEFT, BUTTON_MENU|BUTTON_LEFT, BUTTON_NONE },
{ ACTION_USB_HID_MOUSE_LDRAG_LEFT_REP, BUTTON_SELECT|BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE },
{ ACTION_USB_HID_MOUSE_LDRAG_LEFT_REP, BUTTON_MENU|BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE },
{ ACTION_USB_HID_MOUSE_LDRAG_RIGHT, BUTTON_SELECT|BUTTON_RIGHT, BUTTON_NONE },
{ ACTION_USB_HID_MOUSE_LDRAG_RIGHT, BUTTON_MENU|BUTTON_RIGHT, BUTTON_NONE },
{ ACTION_USB_HID_MOUSE_LDRAG_RIGHT_REP, BUTTON_SELECT|BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE },
{ ACTION_USB_HID_MOUSE_LDRAG_RIGHT_REP, BUTTON_MENU|BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE },
{ ACTION_USB_HID_MOUSE_RDRAG_UP, BUTTON_PLAY|BUTTON_UP, BUTTON_NONE },
{ ACTION_USB_HID_MOUSE_RDRAG_UP_REP, BUTTON_PLAY|BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE },
{ ACTION_USB_HID_MOUSE_RDRAG_DOWN, BUTTON_PLAY|BUTTON_DOWN, BUTTON_NONE },
{ ACTION_USB_HID_MOUSE_RDRAG_DOWN_REP, BUTTON_PLAY|BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE },
{ ACTION_USB_HID_MOUSE_RDRAG_LEFT, BUTTON_PLAY|BUTTON_LEFT, BUTTON_NONE },
{ ACTION_USB_HID_MOUSE_RDRAG_LEFT_REP, BUTTON_PLAY|BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE },
{ ACTION_USB_HID_MOUSE_RDRAG_RIGHT, BUTTON_PLAY|BUTTON_RIGHT, BUTTON_NONE },
{ ACTION_USB_HID_MOUSE_RDRAG_RIGHT_REP, BUTTON_PLAY|BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE },
{ ACTION_USB_HID_MOUSE_BUTTON_LEFT, BUTTON_SELECT, BUTTON_NONE },
{ ACTION_USB_HID_MOUSE_BUTTON_LEFT, BUTTON_MENU, BUTTON_NONE },
{ ACTION_USB_HID_MOUSE_BUTTON_LEFT_REL, BUTTON_SELECT|BUTTON_REL, BUTTON_NONE },
{ ACTION_USB_HID_MOUSE_BUTTON_LEFT_REL, BUTTON_MENU|BUTTON_REL, BUTTON_NONE },
{ ACTION_USB_HID_MOUSE_BUTTON_RIGHT, BUTTON_PLAY, BUTTON_NONE },
{ ACTION_USB_HID_MOUSE_BUTTON_RIGHT_REL, BUTTON_PLAY|BUTTON_REL, BUTTON_NONE },
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_USB_HID)
}; /* button_context_usb_hid_mouse */
static const struct button_mapping remote_button_context_usb_hid[] = {
{ ACTION_USB_HID_PLAY, BUTTON_RC_PLAY, BUTTON_NONE },
{ ACTION_USB_HID_STOP, BUTTON_RC_PLAY|BUTTON_REPEAT, BUTTON_NONE },

View file

@ -173,8 +173,8 @@ static const struct button_mapping button_context_usb_hid[] = {
{ ACTION_USB_HID_INC, BUTTON_VOL_UP|BUTTON_REPEAT, BUTTON_NONE },
{ ACTION_USB_HID_DEC, BUTTON_VOL_DOWN, BUTTON_NONE },
{ ACTION_USB_HID_DEC, BUTTON_VOL_DOWN|BUTTON_REPEAT, BUTTON_NONE },
{ ACTION_USB_HID_QUIT, BUTTON_POWER|BUTTON_REPEAT, BUTTON_SELECT },
{ ACTION_USB_HID_SELECT, BUTTON_POWER|BUTTON_REL, BUTTON_SELECT },
{ ACTION_USB_HID_QUIT, BUTTON_POWER|BUTTON_REPEAT, BUTTON_POWER },
{ ACTION_USB_HID_SELECT, BUTTON_POWER|BUTTON_REL, BUTTON_POWER },
{ ACTION_USB_HID_MENU, BUTTON_MENU|BUTTON_REPEAT, BUTTON_MENU },
{ ACTION_USB_HID_MODE, BUTTON_MENU|BUTTON_REL, BUTTON_MENU },

View file

@ -293,7 +293,7 @@ static const struct button_mapping button_context_usb_hid[] = {
{ ACTION_USB_HID_LEFT, BUTTON_LEFT|BUTTON_REL, BUTTON_LEFT },
{ ACTION_USB_HID_LEFT_LONG, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_LEFT },
{ ACTION_USB_HID_RIGHT, BUTTON_RIGHT|BUTTON_REL, BUTTON_RIGHT },
{ ACTION_USB_HID_RIGHT_LONG, BUTTON_RIGHT|BUTTON_REPEAT BUTTON_RIGHT },
{ ACTION_USB_HID_RIGHT_LONG, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_RIGHT },
{ ACTION_USB_HID_SELECT, BUTTON_NEXT|BUTTON_REL, BUTTON_NEXT },
{ ACTION_USB_HID_SELECT_LONG, BUTTON_NEXT|BUTTON_REPEAT, BUTTON_NEXT },
{ ACTION_USB_HID_MENU, BUTTON_MENU|BUTTON_REL, BUTTON_MENU },

View file

@ -195,8 +195,6 @@ void usb_screen(void)
else
#endif
{
char mode_name[MODE_NAME_LEN];
#ifdef HAVE_LCD_BITMAP
screens[i].transparent_bitmap(usblogo,
(LCD_WIDTH-BMPWIDTH_usblogo),
@ -204,6 +202,7 @@ void usb_screen(void)
BMPWIDTH_usblogo, BMPHEIGHT_usblogo);
#ifdef USB_ENABLE_HID
char mode_name[MODE_NAME_LEN];
int y, w, h;
screens[i].getstringsize(str(LANG_USB_KEYPAD_MODE), &w, &h);