diff options
Diffstat (limited to 'uisimulator')
-rw-r--r-- | uisimulator/bitmaps/UI-ihifi770.bmp | bin | 0 -> 792176 bytes | |||
-rw-r--r-- | uisimulator/bitmaps/UI-ihifi770c.bmp | bin | 0 -> 792176 bytes | |||
-rw-r--r-- | uisimulator/bitmaps/UI-ihifi800.bmp | bin | 0 -> 603056 bytes | |||
-rw-r--r-- | uisimulator/buttonmap/SOURCES | 2 | ||||
-rw-r--r-- | uisimulator/buttonmap/ihifi2.c | 90 |
5 files changed, 92 insertions, 0 deletions
diff --git a/uisimulator/bitmaps/UI-ihifi770.bmp b/uisimulator/bitmaps/UI-ihifi770.bmp new file mode 100644 index 0000000000..4f2513828a --- /dev/null +++ b/uisimulator/bitmaps/UI-ihifi770.bmp | |||
Binary files differ | |||
diff --git a/uisimulator/bitmaps/UI-ihifi770c.bmp b/uisimulator/bitmaps/UI-ihifi770c.bmp new file mode 100644 index 0000000000..4f2513828a --- /dev/null +++ b/uisimulator/bitmaps/UI-ihifi770c.bmp | |||
Binary files differ | |||
diff --git a/uisimulator/bitmaps/UI-ihifi800.bmp b/uisimulator/bitmaps/UI-ihifi800.bmp new file mode 100644 index 0000000000..710f85102a --- /dev/null +++ b/uisimulator/bitmaps/UI-ihifi800.bmp | |||
Binary files differ | |||
diff --git a/uisimulator/buttonmap/SOURCES b/uisimulator/buttonmap/SOURCES index d46066d478..4c6ca3adef 100644 --- a/uisimulator/buttonmap/SOURCES +++ b/uisimulator/buttonmap/SOURCES | |||
@@ -87,5 +87,7 @@ sony-nwza860.c | |||
87 | agptek-rocker.c | 87 | agptek-rocker.c |
88 | #elif CONFIG_KEYPAD == XDUOO_X3_PAD | 88 | #elif CONFIG_KEYPAD == XDUOO_X3_PAD |
89 | xduoo-x3.c | 89 | xduoo-x3.c |
90 | #elif (CONFIG_KEYPAD == IHIFI_770_PAD) || (CONFIG_KEYPAD == IHIFI_800_PAD) | ||
91 | ihifi2.c | ||
90 | #endif | 92 | #endif |
91 | #endif /* SIMULATOR */ | 93 | #endif /* SIMULATOR */ |
diff --git a/uisimulator/buttonmap/ihifi2.c b/uisimulator/buttonmap/ihifi2.c new file mode 100644 index 0000000000..a197ab8ac2 --- /dev/null +++ b/uisimulator/buttonmap/ihifi2.c | |||
@@ -0,0 +1,90 @@ | |||
1 | /*************************************************************************** | ||
2 | * __________ __ ___. | ||
3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
7 | * \/ \/ \/ \/ \/ | ||
8 | * $Id$ | ||
9 | * | ||
10 | * Copyright (C) 2016 by Roman Stolyarov | ||
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_KP8: | ||
33 | case SDLK_ESCAPE: | ||
34 | new_btn = BUTTON_POWER; | ||
35 | break; | ||
36 | case SDLK_KP4: | ||
37 | case SDLK_KP_ENTER: | ||
38 | case SDLK_SPACE: | ||
39 | case SDLK_RETURN: | ||
40 | new_btn = BUTTON_PLAY; | ||
41 | break; | ||
42 | case SDLK_KP5: | ||
43 | case SDLK_UP: | ||
44 | new_btn = BUTTON_PREV; | ||
45 | break; | ||
46 | case SDLK_KP6: | ||
47 | case SDLK_PAGEUP: | ||
48 | new_btn = BUTTON_VOL_UP; | ||
49 | break; | ||
50 | case SDLK_KP1: | ||
51 | case SDLK_BACKSPACE: | ||
52 | new_btn = BUTTON_HOME; | ||
53 | break; | ||
54 | case SDLK_KP2: | ||
55 | case SDLK_DOWN: | ||
56 | new_btn = BUTTON_NEXT; | ||
57 | break; | ||
58 | case SDLK_KP3: | ||
59 | case SDLK_PAGEDOWN: | ||
60 | new_btn = BUTTON_VOL_DOWN; | ||
61 | break; | ||
62 | } | ||
63 | return new_btn; | ||
64 | } | ||
65 | |||
66 | #if (CONFIG_KEYPAD == IHIFI_770_PAD) | ||
67 | struct button_map bm[] = { | ||
68 | { SDLK_KP8, 210, 0, 20, "Power" }, | ||
69 | { SDLK_KP4, 94, 430, 40, "Play" }, | ||
70 | { SDLK_KP5, 190, 430, 40, "Prev" }, | ||
71 | { SDLK_KP6, 285, 430, 40, "Vol Up" }, | ||
72 | { SDLK_KP1, 94, 508, 40, "Home" }, | ||
73 | { SDLK_KP2, 190, 508, 40, "Next" }, | ||
74 | { SDLK_KP3, 285, 508, 40, "Vol Down" }, | ||
75 | { 0, 0, 0, 0, "None" } | ||
76 | }; | ||
77 | #elif (CONFIG_KEYPAD == IHIFI_800_PAD) | ||
78 | struct button_map bm[] = { | ||
79 | { SDLK_KP8, 214, 468, 25, "Power" }, | ||
80 | { SDLK_KP4, 168, 580, 25, "Play" }, | ||
81 | { SDLK_KP5, 60, 524, 25, "Prev" }, | ||
82 | { SDLK_KP6, 102, 455, 25, "Vol Up" }, | ||
83 | { SDLK_KP1, 246, 580, 25, "Home" }, | ||
84 | { SDLK_KP2, 60, 580, 25, "Next" }, | ||
85 | { SDLK_KP3, 50, 455, 25, "Vol Down" }, | ||
86 | { 0, 0, 0, 0, "None" } | ||
87 | }; | ||
88 | #else | ||
89 | #error please define button map | ||
90 | #endif | ||