diff options
author | Szymon Dziok <b0hoon@o2.pl> | 2010-10-21 22:20:16 +0000 |
---|---|---|
committer | Szymon Dziok <b0hoon@o2.pl> | 2010-10-21 22:20:16 +0000 |
commit | c8dfe0508e176b87594f12a67467d51715f53a54 (patch) | |
tree | 2c5e8be6a0986cf29dc0f4628671a1abf7b2c0c0 | |
parent | 93ac9868670f3005813c7443988a612c8bab96e3 (diff) | |
download | rockbox-c8dfe0508e176b87594f12a67467d51715f53a54.tar.gz rockbox-c8dfe0508e176b87594f12a67467d51715f53a54.zip |
HDD6330: add the simulator.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28323 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r-- | firmware/target/hosted/sdl/sim-ui-defines.h | 7 | ||||
-rw-r--r-- | uisimulator/bitmaps/UI-gogearhdd6330.bmp | bin | 0 -> 736854 bytes | |||
-rw-r--r-- | uisimulator/buttonmap/SOURCES | 2 | ||||
-rw-r--r-- | uisimulator/buttonmap/gogear-hdd6330.c | 79 |
4 files changed, 88 insertions, 0 deletions
diff --git a/firmware/target/hosted/sdl/sim-ui-defines.h b/firmware/target/hosted/sdl/sim-ui-defines.h index 926356dd9f..c44fea54b7 100644 --- a/firmware/target/hosted/sdl/sim-ui-defines.h +++ b/firmware/target/hosted/sdl/sim-ui-defines.h | |||
@@ -333,6 +333,13 @@ | |||
333 | #define UI_LCD_POSX 143 /* x position of lcd */ | 333 | #define UI_LCD_POSX 143 /* x position of lcd */ |
334 | #define UI_LCD_POSY 27 /* y position of lcd */ | 334 | #define UI_LCD_POSY 27 /* y position of lcd */ |
335 | 335 | ||
336 | #elif defined(PHILIPS_HDD6330) | ||
337 | #define UI_TITLE "Philips GoGear HDD63X0" | ||
338 | #define UI_WIDTH 400 /* width of GUI window */ | ||
339 | #define UI_HEIGHT 614 /* height of GUI window */ | ||
340 | #define UI_LCD_POSX 89 /* x position of lcd */ | ||
341 | #define UI_LCD_POSY 113 /* y position of lcd */ | ||
342 | |||
336 | #elif defined(SANSA_M200V4) | 343 | #elif defined(SANSA_M200V4) |
337 | #define UI_TITLE "sansa m200v4" | 344 | #define UI_TITLE "sansa m200v4" |
338 | #define UI_WIDTH 350 /* width of GUI window */ | 345 | #define UI_WIDTH 350 /* width of GUI window */ |
diff --git a/uisimulator/bitmaps/UI-gogearhdd6330.bmp b/uisimulator/bitmaps/UI-gogearhdd6330.bmp new file mode 100644 index 0000000000..92ea0a2166 --- /dev/null +++ b/uisimulator/bitmaps/UI-gogearhdd6330.bmp | |||
Binary files differ | |||
diff --git a/uisimulator/buttonmap/SOURCES b/uisimulator/buttonmap/SOURCES index 0fc9d16097..7ab80da5d3 100644 --- a/uisimulator/buttonmap/SOURCES +++ b/uisimulator/buttonmap/SOURCES | |||
@@ -51,6 +51,8 @@ meizu-m6sl.c | |||
51 | gogear-sa9200.c | 51 | gogear-sa9200.c |
52 | #elif CONFIG_KEYPAD == PHILIPS_HDD1630_PAD | 52 | #elif CONFIG_KEYPAD == PHILIPS_HDD1630_PAD |
53 | gogear-hdd1630.c | 53 | gogear-hdd1630.c |
54 | #elif CONFIG_KEYPAD == PHILIPS_HDD6330_PAD | ||
55 | gogear-hdd6330.c | ||
54 | #elif CONFIG_KEYPAD == ONDAVX747_PAD | 56 | #elif CONFIG_KEYPAD == ONDAVX747_PAD |
55 | onda-vx747.c | 57 | onda-vx747.c |
56 | #elif CONFIG_KEYPAD == ONDAVX777_PAD | 58 | #elif CONFIG_KEYPAD == ONDAVX777_PAD |
diff --git a/uisimulator/buttonmap/gogear-hdd6330.c b/uisimulator/buttonmap/gogear-hdd6330.c new file mode 100644 index 0000000000..ee3ad56971 --- /dev/null +++ b/uisimulator/buttonmap/gogear-hdd6330.c | |||
@@ -0,0 +1,79 @@ | |||
1 | /*************************************************************************** | ||
2 | * __________ __ ___. | ||
3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
7 | * \/ \/ \/ \/ \/ | ||
8 | * $Id$ | ||
9 | * | ||
10 | * Copyright (C) 2010 Szymon Dziok | ||
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_KP5: | ||
49 | case SDLK_SPACE: | ||
50 | new_btn = BUTTON_PLAY; | ||
51 | break; | ||
52 | case SDLK_KP7: | ||
53 | new_btn = BUTTON_PREV; | ||
54 | break; | ||
55 | case SDLK_KP9: | ||
56 | new_btn = BUTTON_NEXT; | ||
57 | break; | ||
58 | case SDLK_KP1: | ||
59 | new_btn = BUTTON_MENU; | ||
60 | break; | ||
61 | case SDLK_KP3: | ||
62 | new_btn = BUTTON_VIEW; | ||
63 | break; | ||
64 | case SDLK_KP_MULTIPLY: | ||
65 | new_btn = BUTTON_POWER; | ||
66 | break; | ||
67 | case SDLK_KP_PLUS: | ||
68 | new_btn = BUTTON_VOL_UP; | ||
69 | break; | ||
70 | case SDLK_KP_MINUS: | ||
71 | new_btn = BUTTON_VOL_DOWN; | ||
72 | break; | ||
73 | } | ||
74 | return new_btn; | ||
75 | } | ||
76 | |||
77 | struct button_map bm[] = { | ||
78 | { 0, 0, 0, 0, "None" } | ||
79 | }; | ||