diff options
author | Amaury Pouly <pamaury@rockbox.org> | 2011-09-25 15:35:39 +0000 |
---|---|---|
committer | Amaury Pouly <pamaury@rockbox.org> | 2011-09-25 15:35:39 +0000 |
commit | 2546bc59ccac97cc6ce8561761234cd1604b55c7 (patch) | |
tree | cbfc38008eff4f8b37a260633bf05dda79fb5432 /uisimulator | |
parent | aca6b9e91adcabf4b8dbb85d5674ffd42b82c0f0 (diff) | |
download | rockbox-2546bc59ccac97cc6ce8561761234cd1604b55c7.tar.gz rockbox-2546bc59ccac97cc6ce8561761234cd1604b55c7.zip |
imx233/fuze+: add fuze+ to the simulator framework
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30602 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'uisimulator')
-rw-r--r-- | uisimulator/bitmaps/UI-sansafuzeplus.bmp | bin | 0 -> 773554 bytes | |||
-rw-r--r-- | uisimulator/buttonmap/SOURCES | 2 | ||||
-rw-r--r-- | uisimulator/buttonmap/sansa-fuze.c | 20 | ||||
-rw-r--r-- | uisimulator/buttonmap/sansa-fuzeplus.c | 88 |
4 files changed, 100 insertions, 10 deletions
diff --git a/uisimulator/bitmaps/UI-sansafuzeplus.bmp b/uisimulator/bitmaps/UI-sansafuzeplus.bmp new file mode 100644 index 0000000000..e706f54905 --- /dev/null +++ b/uisimulator/bitmaps/UI-sansafuzeplus.bmp | |||
Binary files differ | |||
diff --git a/uisimulator/buttonmap/SOURCES b/uisimulator/buttonmap/SOURCES index c9955d408f..4a2c8ff2e1 100644 --- a/uisimulator/buttonmap/SOURCES +++ b/uisimulator/buttonmap/SOURCES | |||
@@ -65,5 +65,7 @@ pbell-vibe500.c | |||
65 | mpio-hd200.c | 65 | mpio-hd200.c |
66 | #elif CONFIG_KEYPAD == MPIO_HD300_PAD | 66 | #elif CONFIG_KEYPAD == MPIO_HD300_PAD |
67 | mpio-hd300.c | 67 | mpio-hd300.c |
68 | #elif CONFIG_KEYPAD == SANSA_FUZEPLUS_PAD | ||
69 | sansa-fuzeplus.c | ||
68 | #endif | 70 | #endif |
69 | #endif /* SIMULATOR */ | 71 | #endif /* SIMULATOR */ |
diff --git a/uisimulator/buttonmap/sansa-fuze.c b/uisimulator/buttonmap/sansa-fuze.c index fcd935946e..c6378c3d6c 100644 --- a/uisimulator/buttonmap/sansa-fuze.c +++ b/uisimulator/buttonmap/sansa-fuze.c | |||
@@ -77,15 +77,15 @@ int key_to_button(int keyboard_button) | |||
77 | } | 77 | } |
78 | 78 | ||
79 | struct button_map bm[] = { | 79 | struct button_map bm[] = { |
80 | { SDLK_KP8, 70, 265, 35, "Scroll Back" }, | 80 | { SDLK_KP7, 70, 400, 15, "Back" }, |
81 | { SDLK_KP9, 141, 255, 31, "Play" }, | 81 | { SDLK_KP9, 258, 400, 15, "Play/Pause" }, |
82 | { SDLK_KP_MULTIPLY, 228, 267, 18, "Home" }, | 82 | { SDLK_KP5, 162, 476, 15, "Select" }, |
83 | { SDLK_LEFT, 69, 329, 31, "Left" }, | 83 | { SDLK_KP8, 162, 407, 35, "Up" }, |
84 | { SDLK_SPACE, 141, 330, 20, "Select" }, | 84 | { SDLK_KP2, 162, 546, 35, "Down" }, |
85 | { SDLK_RIGHT, 214, 331, 23, "Right" }, | 85 | { SDLK_KP6, 233, 546, 35, "Right" }, |
86 | { SDLK_KP3, 142, 406, 30, "Menu" }, | 86 | { SDLK_KP4, 92, 476, 35, "Left" }, |
87 | { SDLK_DOWN, 221, 384, 24, "Scroll Fwd" }, | 87 | { SDLK_KP_MINUS, 20, 190, 20, "Volume-" }, |
88 | { SDLK_KP_MINUS, 270, 299, 25, "Power" }, | 88 | { SDLK_KP_PLUS, 20, 130, 20, "Volume+" }, |
89 | { SDLK_h, 269, 358, 26, "Hold" }, | 89 | { SDLK_KP1, 160, 15, 15, "Power" }, |
90 | { 0, 0, 0, 0, "None" } | 90 | { 0, 0, 0, 0, "None" } |
91 | }; | 91 | }; |
diff --git a/uisimulator/buttonmap/sansa-fuzeplus.c b/uisimulator/buttonmap/sansa-fuzeplus.c new file mode 100644 index 0000000000..bd78274a03 --- /dev/null +++ b/uisimulator/buttonmap/sansa-fuzeplus.c | |||
@@ -0,0 +1,88 @@ | |||
1 | /*************************************************************************** | ||
2 | * __________ __ ___. | ||
3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
7 | * \/ \/ \/ \/ \/ | ||
8 | * $Id$ | ||
9 | * | ||
10 | * Copyright (C) 2011 by Amaury Pouly | ||
11 | * | ||
12 | * This program is free software; you can redistribute it and/or | ||
13 | * modify it under the terms of the GNU General Public License | ||
14 | * as published by the Free Software Foundation; either version 2 | ||
15 | * of the License, or (at your option) any later version. | ||
16 | * | ||
17 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY | ||
18 | * KIND, either express or implied. | ||
19 | * | ||
20 | ****************************************************************************/ | ||
21 | |||
22 | |||
23 | #include <SDL.h> | ||
24 | #include "button.h" | ||
25 | #include "buttonmap.h" | ||
26 | |||
27 | int key_to_button(int keyboard_button) | ||
28 | { | ||
29 | int new_btn = BUTTON_NONE; | ||
30 | switch (keyboard_button) | ||
31 | { | ||
32 | case SDLK_KP4: | ||
33 | case SDLK_LEFT: | ||
34 | new_btn = BUTTON_LEFT; | ||
35 | break; | ||
36 | case SDLK_KP6: | ||
37 | case SDLK_RIGHT: | ||
38 | new_btn = BUTTON_RIGHT; | ||
39 | break; | ||
40 | case SDLK_KP8: | ||
41 | case SDLK_UP: | ||
42 | new_btn = BUTTON_UP; | ||
43 | break; | ||
44 | case SDLK_KP2: | ||
45 | case SDLK_DOWN: | ||
46 | new_btn = BUTTON_DOWN; | ||
47 | break; | ||
48 | case SDLK_PAGEUP: | ||
49 | case SDLK_KP9: | ||
50 | new_btn = BUTTON_PLAYPAUSE; | ||
51 | break; | ||
52 | case SDLK_INSERT: | ||
53 | case SDLK_KP7: | ||
54 | new_btn = BUTTON_BACK; | ||
55 | break; | ||
56 | case SDLK_KP5: | ||
57 | case SDLK_SPACE: | ||
58 | case SDLK_KP_ENTER: | ||
59 | case SDLK_RETURN: | ||
60 | new_btn = BUTTON_SELECT; | ||
61 | break; | ||
62 | case SDLK_KP_PLUS: | ||
63 | new_btn = BUTTON_VOL_UP; | ||
64 | break; | ||
65 | case SDLK_KP_MINUS: | ||
66 | new_btn = BUTTON_VOL_DOWN; | ||
67 | break; | ||
68 | case SDLK_HOME: | ||
69 | case SDLK_KP1: | ||
70 | new_btn = BUTTON_POWER; | ||
71 | break; | ||
72 | } | ||
73 | return new_btn; | ||
74 | } | ||
75 | |||
76 | struct button_map bm[] = { | ||
77 | { SDLK_KP8, 70, 265, 35, "Scroll Back" }, | ||
78 | { SDLK_KP9, 141, 255, 31, "Play" }, | ||
79 | { SDLK_KP_MULTIPLY, 228, 267, 18, "Home" }, | ||
80 | { SDLK_LEFT, 69, 329, 31, "Left" }, | ||
81 | { SDLK_SPACE, 141, 330, 20, "Select" }, | ||
82 | { SDLK_RIGHT, 214, 331, 23, "Right" }, | ||
83 | { SDLK_KP3, 142, 406, 30, "Menu" }, | ||
84 | { SDLK_DOWN, 221, 384, 24, "Scroll Fwd" }, | ||
85 | { SDLK_KP_MINUS, 270, 299, 25, "Power" }, | ||
86 | { SDLK_h, 269, 358, 26, "Hold" }, | ||
87 | { 0, 0, 0, 0, "None" } | ||
88 | }; | ||