diff options
Diffstat (limited to 'uisimulator')
-rw-r--r-- | uisimulator/sdl/UI-m3.bmp | bin | 0 -> 398852 bytes | |||
-rw-r--r-- | uisimulator/sdl/button.c | 30 | ||||
-rw-r--r-- | uisimulator/sdl/lcd-bitmap.c | 5 | ||||
-rw-r--r-- | uisimulator/sdl/uisdl.h | 13 |
4 files changed, 47 insertions, 1 deletions
diff --git a/uisimulator/sdl/UI-m3.bmp b/uisimulator/sdl/UI-m3.bmp new file mode 100644 index 0000000000..add298cc89 --- /dev/null +++ b/uisimulator/sdl/UI-m3.bmp | |||
Binary files differ | |||
diff --git a/uisimulator/sdl/button.c b/uisimulator/sdl/button.c index 967f41baf7..03f7dc1e96 100644 --- a/uisimulator/sdl/button.c +++ b/uisimulator/sdl/button.c | |||
@@ -262,6 +262,36 @@ void button_event(int key, bool pressed) | |||
262 | new_btn = BUTTON_SELECT; | 262 | new_btn = BUTTON_SELECT; |
263 | break; | 263 | break; |
264 | 264 | ||
265 | #elif CONFIG_KEYPAD == IAUDIO_M3_PAD | ||
266 | case SDLK_KP4: | ||
267 | case SDLK_LEFT: | ||
268 | new_btn = BUTTON_LEFT; | ||
269 | break; | ||
270 | case SDLK_KP6: | ||
271 | case SDLK_RIGHT: | ||
272 | new_btn = BUTTON_RIGHT; | ||
273 | break; | ||
274 | case SDLK_KP8: | ||
275 | case SDLK_UP: | ||
276 | new_btn = BUTTON_VOL_UP; | ||
277 | break; | ||
278 | case SDLK_KP2: | ||
279 | case SDLK_DOWN: | ||
280 | new_btn = BUTTON_VOL_DOWN; | ||
281 | break; | ||
282 | case SDLK_KP_PERIOD: | ||
283 | case SDLK_INSERT: | ||
284 | new_btn = BUTTON_MODE; | ||
285 | break; | ||
286 | case SDLK_KP_DIVIDE: | ||
287 | case SDLK_F1: | ||
288 | new_btn = BUTTON_REC; | ||
289 | break; | ||
290 | case SDLK_KP5: | ||
291 | case SDLK_SPACE: | ||
292 | new_btn = BUTTON_PLAY; | ||
293 | break; | ||
294 | |||
265 | #elif (CONFIG_KEYPAD == IPOD_1G2G_PAD) || (CONFIG_KEYPAD == IPOD_3G_PAD) \ | 295 | #elif (CONFIG_KEYPAD == IPOD_1G2G_PAD) || (CONFIG_KEYPAD == IPOD_3G_PAD) \ |
266 | || (CONFIG_KEYPAD == IPOD_4G_PAD) | 296 | || (CONFIG_KEYPAD == IPOD_4G_PAD) |
267 | case SDLK_KP4: | 297 | case SDLK_KP4: |
diff --git a/uisimulator/sdl/lcd-bitmap.c b/uisimulator/sdl/lcd-bitmap.c index 438b133804..fa3e5d2b0d 100644 --- a/uisimulator/sdl/lcd-bitmap.c +++ b/uisimulator/sdl/lcd-bitmap.c | |||
@@ -45,8 +45,11 @@ static unsigned long get_lcd_pixel(int x, int y) | |||
45 | #elif LCD_DEPTH == 2 | 45 | #elif LCD_DEPTH == 2 |
46 | #if LCD_PIXELFORMAT == HORIZONTAL_PACKING | 46 | #if LCD_PIXELFORMAT == HORIZONTAL_PACKING |
47 | return ((lcd_framebuffer[y][x/4] >> (2 * (~x & 3))) & 3); | 47 | return ((lcd_framebuffer[y][x/4] >> (2 * (~x & 3))) & 3); |
48 | #else | 48 | #elif LCD_PIXELFORMAT == VERTICAL_PACKING |
49 | return ((lcd_framebuffer[y/4][x] >> (2 * (y & 3))) & 3); | 49 | return ((lcd_framebuffer[y/4][x] >> (2 * (y & 3))) & 3); |
50 | #elif LCD_PIXELFORMAT == VERTICAL_INTERLEAVED | ||
51 | unsigned bits = (lcd_framebuffer[y/8][x] >> (y & 7)) & 0x0101; | ||
52 | return (bits | (bits >> 7)) & 3; | ||
50 | #endif | 53 | #endif |
51 | #elif LCD_DEPTH == 16 | 54 | #elif LCD_DEPTH == 16 |
52 | #if LCD_PIXELFORMAT == RGB565SWAPPED | 55 | #if LCD_PIXELFORMAT == RGB565SWAPPED |
diff --git a/uisimulator/sdl/uisdl.h b/uisimulator/sdl/uisdl.h index 3503d296f7..37989a682b 100644 --- a/uisimulator/sdl/uisdl.h +++ b/uisimulator/sdl/uisdl.h | |||
@@ -232,6 +232,19 @@ | |||
232 | #define UI_REMOTE_WIDTH 128 | 232 | #define UI_REMOTE_WIDTH 128 |
233 | #define UI_REMOTE_HEIGHT 96 | 233 | #define UI_REMOTE_HEIGHT 96 |
234 | 234 | ||
235 | #elif defined(IAUDIO_M3) | ||
236 | #define UI_TITLE "iAudio M3" | ||
237 | #define UI_WIDTH 397 /* width of GUI window */ | ||
238 | #define UI_HEIGHT 501 /* height of GUI window */ | ||
239 | #define UI_LCD_POSX 92 /* x position of lcd */ | ||
240 | #define UI_LCD_POSY 348 /* y position of lcd */ | ||
241 | #define UI_LCD_BGCOLOR 90, 145, 90 /* bkgnd color of LCD (no bklight) */ | ||
242 | #define UI_LCD_BGCOLORLIGHT 130, 180, 250 /* bkgnd color of LCD (bklight) */ | ||
243 | #define UI_LCD_FGCOLOR 0, 0, 0 /* foreground color of LCD (no backlight) */ | ||
244 | #define UI_LCD_FGCOLORLIGHT 0, 0, 0 /* foreground color of LCD (backlight) */ | ||
245 | #define UI_LCD_WIDTH LCD_WIDTH /* * 1.5 */ | ||
246 | #define UI_LCD_HEIGHT LCD_HEIGHT /* * 1.5 */ | ||
247 | |||
235 | #elif defined(GIGABEAT_F) | 248 | #elif defined(GIGABEAT_F) |
236 | #define UI_TITLE "Toshiba Gigabeat" | 249 | #define UI_TITLE "Toshiba Gigabeat" |
237 | #define UI_WIDTH 401 /* width of GUI window */ | 250 | #define UI_WIDTH 401 /* width of GUI window */ |