summaryrefslogtreecommitdiffstats
path: root/uisimulator
diff options
context:
space:
mode:
authorTomasz Moń <desowin@gmail.com>2011-12-01 14:18:28 +0000
committerTomasz Moń <desowin@gmail.com>2011-12-01 14:18:28 +0000
commit7c0977b8786c738a5a7d053b2b2e4fe43bd2abb5 (patch)
tree2d98e5e5043892be1e831ae7364afe5b4f8efe2c /uisimulator
parent8b9d6bdd1fe76228309102091cea56eaedf45a90 (diff)
downloadrockbox-7c0977b8786c738a5a7d053b2b2e4fe43bd2abb5.tar.gz
rockbox-7c0977b8786c738a5a7d053b2b2e4fe43bd2abb5.tar.bz2
rockbox-7c0977b8786c738a5a7d053b2b2e4fe43bd2abb5.zip
Sansa Connect Simulator: Fix button sizes, add hold button support
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31106 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'uisimulator')
-rw-r--r--uisimulator/buttonmap/sansa-connect.c30
1 files changed, 17 insertions, 13 deletions
diff --git a/uisimulator/buttonmap/sansa-connect.c b/uisimulator/buttonmap/sansa-connect.c
index 5e65544ab0..608d454e18 100644
--- a/uisimulator/buttonmap/sansa-connect.c
+++ b/uisimulator/buttonmap/sansa-connect.c
@@ -52,7 +52,7 @@ int key_to_button(int keyboard_button)
case SDLK_KP9:
new_btn = BUTTON_NEXT;
break;
- case SDLK_KP0:
+ case SDLK_KP_DIVIDE:
new_btn = BUTTON_POWER;
break;
case SDLK_KP5:
@@ -75,22 +75,26 @@ int key_to_button(int keyboard_button)
case SDLK_KP1:
new_btn = BUTTON_SCROLL_BACK;
break;
+ case SDLK_h:
+ new_btn = BUTTON_HOLD;
+ break;
}
return new_btn;
}
struct button_map bm[] = {
- { SDLK_UP, 191, 505, 36, "Up" },
- { SDLK_DOWN, 191, 630, 36, "Down" },
- { SDLK_LEFT, 130, 568, 36, "Left" },
- { SDLK_RIGHT, 256, 568, 36, "Right" },
- { SDLK_KP7, 107, 443, 40, "Prev" },
- { SDLK_KP9, 271, 443, 40, "Next" },
- { SDLK_KP5, 191, 568, 36, "Select" },
- { SDLK_KP0, 220, 43, 30, "Power" },
- { SDLK_KP3, 231, 520, 20, "Scroll Fwd" },
- { SDLK_KP1, 149, 520, 20, "Scroll Back" },
- { SDLK_KP_MINUS, 3, 377, 50, "Volume -" },
- { SDLK_KP_PLUS, 6, 175, 50, "Volume +" },
+ { SDLK_UP, 191, 505, 18, "Up" },
+ { SDLK_DOWN, 191, 630, 18, "Down" },
+ { SDLK_LEFT, 130, 568, 18, "Left" },
+ { SDLK_RIGHT, 256, 568, 18, "Right" },
+ { SDLK_KP7, 107, 443, 20, "Prev" },
+ { SDLK_KP9, 271, 443, 20, "Next" },
+ { SDLK_KP5, 191, 568, 18, "Select" },
+ { SDLK_KP_DIVIDE, 220, 43, 15, "Power" },
+ { SDLK_KP3, 231, 520, 10, "Scroll Fwd" },
+ { SDLK_KP1, 149, 520, 10, "Scroll Back" },
+ { SDLK_KP_MINUS, 3, 277, 25, "Volume -" },
+ { SDLK_KP_PLUS, 6, 175, 25, "Volume +" },
+ { SDLK_h, 300, 42, 20, "Hold" },
{ 0, 0, 0, 0, "None" }
};