diff options
Diffstat (limited to 'uisimulator/sdl')
-rw-r--r-- | uisimulator/sdl/UI-mini2440.bmp | bin | 0 -> 577320 bytes | |||
-rw-r--r-- | uisimulator/sdl/button.c | 35 | ||||
-rw-r--r-- | uisimulator/sdl/uisdl.h | 6 |
3 files changed, 41 insertions, 0 deletions
diff --git a/uisimulator/sdl/UI-mini2440.bmp b/uisimulator/sdl/UI-mini2440.bmp new file mode 100644 index 0000000000..556026a5ca --- /dev/null +++ b/uisimulator/sdl/UI-mini2440.bmp | |||
Binary files differ | |||
diff --git a/uisimulator/sdl/button.c b/uisimulator/sdl/button.c index f8889bafb8..3a6b9ce09f 100644 --- a/uisimulator/sdl/button.c +++ b/uisimulator/sdl/button.c | |||
@@ -1190,6 +1190,41 @@ void button_event(int key, bool pressed) | |||
1190 | case SDLK_KP_PLUS: | 1190 | case SDLK_KP_PLUS: |
1191 | new_btn = BUTTON_REC; | 1191 | new_btn = BUTTON_REC; |
1192 | break; | 1192 | break; |
1193 | #elif CONFIG_KEYPAD == MINI2440_PAD | ||
1194 | case SDLK_LEFT: | ||
1195 | new_btn = BUTTON_LEFT; | ||
1196 | break; | ||
1197 | case SDLK_RIGHT: | ||
1198 | new_btn = BUTTON_RIGHT; | ||
1199 | break; | ||
1200 | case SDLK_UP: | ||
1201 | new_btn = BUTTON_UP; | ||
1202 | break; | ||
1203 | case SDLK_DOWN: | ||
1204 | new_btn = BUTTON_DOWN; | ||
1205 | break; | ||
1206 | case SDLK_F8: | ||
1207 | case SDLK_ESCAPE: | ||
1208 | new_btn = BUTTON_POWER; | ||
1209 | break; | ||
1210 | case SDLK_KP_ENTER: | ||
1211 | case SDLK_RETURN: | ||
1212 | case SDLK_a: | ||
1213 | new_btn = BUTTON_A; | ||
1214 | break; | ||
1215 | case SDLK_SPACE: | ||
1216 | new_btn = BUTTON_SELECT; | ||
1217 | break; | ||
1218 | case SDLK_KP_PERIOD: | ||
1219 | case SDLK_INSERT: | ||
1220 | new_btn = BUTTON_MENU; | ||
1221 | break; | ||
1222 | case SDLK_KP_PLUS: | ||
1223 | new_btn = BUTTON_VOL_UP; | ||
1224 | break; | ||
1225 | case SDLK_KP_MINUS: | ||
1226 | new_btn = BUTTON_VOL_DOWN; | ||
1227 | break; | ||
1193 | #else | 1228 | #else |
1194 | #error No keymap defined! | 1229 | #error No keymap defined! |
1195 | #endif /* CONFIG_KEYPAD */ | 1230 | #endif /* CONFIG_KEYPAD */ |
diff --git a/uisimulator/sdl/uisdl.h b/uisimulator/sdl/uisdl.h index 8e60735d05..911f2a3f50 100644 --- a/uisimulator/sdl/uisdl.h +++ b/uisimulator/sdl/uisdl.h | |||
@@ -353,6 +353,12 @@ | |||
353 | #define UI_LCD_POSX 124 /* x position of lcd */ | 353 | #define UI_LCD_POSX 124 /* x position of lcd */ |
354 | #define UI_LCD_POSY 42 /* y position of lcd */ | 354 | #define UI_LCD_POSY 42 /* y position of lcd */ |
355 | 355 | ||
356 | #elif defined(MINI2440) | ||
357 | #define UI_TITLE "Mini2440" | ||
358 | #define UI_WIDTH 441 /* width of GUI window */ | ||
359 | #define UI_HEIGHT 436 /* height of GUI window */ | ||
360 | #define UI_LCD_POSX 148 /* x position of lcd */ | ||
361 | #define UI_LCD_POSY 50 /* y position of lcd */ | ||
356 | #else | 362 | #else |
357 | #error no UI defines | 363 | #error no UI defines |
358 | #endif | 364 | #endif |