summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorTomer Shalev <shalev.tomer@gmail.com>2009-09-30 10:32:21 +0000
committerTomer Shalev <shalev.tomer@gmail.com>2009-09-30 10:32:21 +0000
commit7d22099f2bbf7a5b37cba6cbc8283ad012ab2a38 (patch)
tree391f8cabe13a902a9d86e9a08617c8f7330b3942 /apps
parent8c5141b32ea74a3093073d9bb11205acb7640233 (diff)
downloadrockbox-7d22099f2bbf7a5b37cba6cbc8283ad012ab2a38.tar.gz
rockbox-7d22099f2bbf7a5b37cba6cbc8283ad012ab2a38.tar.bz2
rockbox-7d22099f2bbf7a5b37cba6cbc8283ad012ab2a38.zip
Fix red of r22852
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22853 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r--apps/keymaps/keymap-gigabeat-s.c4
-rw-r--r--apps/keymaps/keymap-mr100.c71
-rw-r--r--apps/keymaps/keymap-ondavx747.c4
-rw-r--r--apps/keymaps/keymap-sa9200.c2
-rw-r--r--apps/screens.c3
5 files changed, 67 insertions, 17 deletions
diff --git a/apps/keymaps/keymap-gigabeat-s.c b/apps/keymaps/keymap-gigabeat-s.c
index 6c5b6decb5..a6b0b8bc68 100644
--- a/apps/keymaps/keymap-gigabeat-s.c
+++ b/apps/keymaps/keymap-gigabeat-s.c
@@ -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 },
diff --git a/apps/keymaps/keymap-mr100.c b/apps/keymaps/keymap-mr100.c
index a605131465..a4facb984c 100644
--- a/apps/keymaps/keymap-mr100.c
+++ b/apps/keymaps/keymap-mr100.c
@@ -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 },
diff --git a/apps/keymaps/keymap-ondavx747.c b/apps/keymaps/keymap-ondavx747.c
index ee590599b6..f2d994d190 100644
--- a/apps/keymaps/keymap-ondavx747.c
+++ b/apps/keymaps/keymap-ondavx747.c
@@ -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 },
diff --git a/apps/keymaps/keymap-sa9200.c b/apps/keymaps/keymap-sa9200.c
index cb9c746cf3..86f608ec35 100644
--- a/apps/keymaps/keymap-sa9200.c
+++ b/apps/keymaps/keymap-sa9200.c
@@ -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 },
diff --git a/apps/screens.c b/apps/screens.c
index 65b64eab3e..5981e91811 100644
--- a/apps/screens.c
+++ b/apps/screens.c
@@ -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);