summaryrefslogtreecommitdiff
path: root/uisimulator/buttonmap
diff options
context:
space:
mode:
Diffstat (limited to 'uisimulator/buttonmap')
-rw-r--r--uisimulator/buttonmap/SOURCES6
-rw-r--r--uisimulator/buttonmap/archos-ondio.c69
-rw-r--r--uisimulator/buttonmap/archos-player.c68
-rw-r--r--uisimulator/buttonmap/archos-recorder.c104
4 files changed, 0 insertions, 247 deletions
diff --git a/uisimulator/buttonmap/SOURCES b/uisimulator/buttonmap/SOURCES
index 130727254c..1e882e3ca4 100644
--- a/uisimulator/buttonmap/SOURCES
+++ b/uisimulator/buttonmap/SOURCES
@@ -17,12 +17,6 @@ iriver-h10.c
17iriver-h100_h300.c 17iriver-h100_h300.c
18#elif CONFIG_KEYPAD == IRIVER_IFP7XX_PAD 18#elif CONFIG_KEYPAD == IRIVER_IFP7XX_PAD
19iriver-ifp7xx.c 19iriver-ifp7xx.c
20#elif CONFIG_KEYPAD == ONDIO_PAD
21archos-ondio.c
22#elif CONFIG_KEYPAD == PLAYER_PAD
23archos-player.c
24#elif CONFIG_KEYPAD == RECORDER_PAD
25archos-recorder.c
26#elif CONFIG_KEYPAD == SANSA_C200_PAD 20#elif CONFIG_KEYPAD == SANSA_C200_PAD
27sansa-c200.c 21sansa-c200.c
28#elif CONFIG_KEYPAD == SANSA_CLIP_PAD 22#elif CONFIG_KEYPAD == SANSA_CLIP_PAD
diff --git a/uisimulator/buttonmap/archos-ondio.c b/uisimulator/buttonmap/archos-ondio.c
deleted file mode 100644
index f92715ced8..0000000000
--- a/uisimulator/buttonmap/archos-ondio.c
+++ /dev/null
@@ -1,69 +0,0 @@
1/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
9 *
10 * Copyright (C) 2006 Dan Everton
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
27int 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_KP_ENTER:
49 case SDLK_RETURN:
50 case SDLK_a:
51 new_btn = BUTTON_OFF;
52 break;
53 case SDLK_KP_PERIOD:
54 case SDLK_INSERT:
55 new_btn = BUTTON_MENU;
56 break;
57 }
58 return new_btn;
59}
60
61struct button_map bm[] = {
62 { SDLK_KP_ENTER, 75, 23, 30, "Enter" },
63 { SDLK_KP8, 75, 174, 33, "KP8" },
64 { SDLK_KP4, 26, 186, 48, "KP4" },
65 { SDLK_KP6, 118, 196, 32, "KP6" },
66 { SDLK_KP2, 75, 234, 16, "KP2" },
67 { SDLK_KP_PERIOD, 54, 250, 24, "Period" },
68 { 0, 0, 0, 0, "None" }
69};
diff --git a/uisimulator/buttonmap/archos-player.c b/uisimulator/buttonmap/archos-player.c
deleted file mode 100644
index 3524e7b243..0000000000
--- a/uisimulator/buttonmap/archos-player.c
+++ /dev/null
@@ -1,68 +0,0 @@
1/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
9 *
10 * Copyright (C) 2006 Dan Everton
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
27int 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_PLAY;
43 break;
44 case SDLK_KP2:
45 case SDLK_DOWN:
46 new_btn = BUTTON_STOP;
47 break;
48 case SDLK_KP_PLUS:
49 case SDLK_F8:
50 new_btn = BUTTON_ON;
51 break;
52 case SDLK_KP_PERIOD:
53 case SDLK_INSERT:
54 new_btn = BUTTON_MENU;
55 break;
56 }
57 return new_btn;
58}
59
60struct button_map bm[] = {
61 { SDLK_KP_PLUS, 79, 252, 23, "On" },
62 { SDLK_KP_PERIOD, 81, 310, 20, "Menu" },
63 { SDLK_KP8, 154, 237, 28, "Play" },
64 { SDLK_KP4, 121, 282, 23, "Left" },
65 { SDLK_KP6, 187, 282, 22, "Right" },
66 { SDLK_KP2, 157, 312, 20, "Down" },
67 { 0, 0, 0, 0, "None" }
68};
diff --git a/uisimulator/buttonmap/archos-recorder.c b/uisimulator/buttonmap/archos-recorder.c
deleted file mode 100644
index cdf98c0814..0000000000
--- a/uisimulator/buttonmap/archos-recorder.c
+++ /dev/null
@@ -1,104 +0,0 @@
1/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
9 *
10 * Copyright (C) 2006 Dan Everton
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 "config.h"
25#include "button.h"
26#include "buttonmap.h"
27
28int key_to_button(int keyboard_button)
29{
30 int new_btn = BUTTON_NONE;
31 switch (keyboard_button)
32 {
33 case SDLK_KP4:
34 case SDLK_LEFT:
35 new_btn = BUTTON_LEFT;
36 break;
37 case SDLK_KP6:
38 case SDLK_RIGHT:
39 new_btn = BUTTON_RIGHT;
40 break;
41 case SDLK_KP8:
42 case SDLK_UP:
43 new_btn = BUTTON_UP;
44 break;
45 case SDLK_KP2:
46 case SDLK_DOWN:
47 new_btn = BUTTON_DOWN;
48 break;
49 case SDLK_KP_PLUS:
50 case SDLK_F8:
51 new_btn = BUTTON_ON;
52 break;
53 case SDLK_KP_ENTER:
54 case SDLK_RETURN:
55 case SDLK_a:
56 new_btn = BUTTON_OFF;
57 break;
58 case SDLK_KP_DIVIDE:
59 case SDLK_F1:
60 new_btn = BUTTON_F1;
61 break;
62 case SDLK_KP_MULTIPLY:
63 case SDLK_F2:
64 new_btn = BUTTON_F2;
65 break;
66 case SDLK_KP_MINUS:
67 case SDLK_F3:
68 new_btn = BUTTON_F3;
69 break;
70 case SDLK_KP5:
71 case SDLK_SPACE:
72 new_btn = BUTTON_PLAY;
73 break;
74 }
75 return new_btn;
76}
77
78struct button_map bm[] = {
79#if defined (ARCHOS_RECORDER)
80 { SDLK_F1, 94, 205, 22, "F1" },
81 { SDLK_F2, 136, 204, 21, "F2" },
82 { SDLK_F3, 174, 204, 24, "F3" },
83 { SDLK_KP_PLUS, 75, 258, 19, "On" },
84 { SDLK_KP_ENTER, 76, 307, 15, "Off" },
85 { SDLK_KP5, 151, 290, 20, "Select" },
86 { SDLK_KP8, 152, 251, 23, "Up" },
87 { SDLK_KP4, 113, 288, 26, "Left" },
88 { SDLK_KP6, 189, 291, 23, "Right" },
89 { SDLK_KP2, 150, 327, 27, "Down" },
90#elif defined (ARCHOS_FMRECORDER) || defined (ARCHOS_RECORDERV2)
91 { SDLK_F1, 88, 210, 28, "F1" },
92 { SDLK_F2, 144, 212, 28, "F2" },
93 { SDLK_F3, 197, 212, 28, "F3" },
94 { SDLK_KP5, 144, 287, 21, "Select" },
95 { SDLK_KP_PLUS, 86, 320, 13, "Menu" },
96 { SDLK_KP_ENTER, 114, 347, 13, "Stop" },
97 { SDLK_y, 144, 288, 31, "None" },
98 { SDLK_KP8, 144, 259, 25, "Up" },
99 { SDLK_KP2, 144, 316, 31, "Down" },
100 { SDLK_KP6, 171, 287, 32, "Right" },
101#endif
102 { SDLK_KP4, 117, 287, 31, "Left" },
103 { 0, 0, 0, 0, "None" }
104};