Win32 simulator now supports iPod Color. Fixed screendump() to correctly work for iPod simulators on big endian machines. Removed duplicate button definitions.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8035 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
b51f7dfc9b
commit
49a0a945ac
8 changed files with 38 additions and 19 deletions
|
@ -176,12 +176,12 @@
|
|||
|
||||
/* TODO: Check WPS button assignments */
|
||||
|
||||
#define WPS_NEXT (BUTTON_NEXT | BUTTON_REL)
|
||||
#define WPS_NEXT_PRE BUTTON_PREV
|
||||
#define WPS_PREV (BUTTON_PREV | BUTTON_REL)
|
||||
#define WPS_PREV_PRE BUTTON_PREV
|
||||
#define WPS_FFWD (BUTTON_NEXT | BUTTON_REPEAT)
|
||||
#define WPS_REW (BUTTON_PREV | BUTTON_REPEAT)
|
||||
#define WPS_NEXT (BUTTON_RIGHT | BUTTON_REL)
|
||||
#define WPS_NEXT_PRE BUTTON_RIGHT
|
||||
#define WPS_PREV (BUTTON_LEFT | BUTTON_REL)
|
||||
#define WPS_PREV_PRE BUTTON_LEFT
|
||||
#define WPS_FFWD (BUTTON_RIGHT | BUTTON_REPEAT)
|
||||
#define WPS_REW (BUTTON_LEFT | BUTTON_REPEAT)
|
||||
#define WPS_INCVOL BUTTON_SCROLL_FWD
|
||||
#define WPS_DECVOL BUTTON_SCROLL_BACK
|
||||
#define WPS_PAUSE BUTTON_PLAY | BUTTON_REL
|
||||
|
|
|
@ -381,7 +381,7 @@ void screen_dump(void)
|
|||
{
|
||||
#if (LCD_PIXELFORMAT == RGB565SWAPPED)
|
||||
/* iPod LCD data is big endian although the CPU is not */
|
||||
*dst++ = swap16(*src++);
|
||||
*dst++ = htobe16(*src++);
|
||||
#else
|
||||
*dst++ = htole16(*src++);
|
||||
#endif
|
||||
|
|
|
@ -106,8 +106,8 @@
|
|||
#define KBD_DONE (BUTTON_SELECT | BUTTON_REPEAT)
|
||||
#define KBD_ABORT BUTTON_MENU
|
||||
|
||||
#define KBD_LEFT BUTTON_PREV
|
||||
#define KBD_RIGHT BUTTON_NEXT
|
||||
#define KBD_LEFT BUTTON_LEFT
|
||||
#define KBD_RIGHT BUTTON_RIGHT
|
||||
#define KBD_UP BUTTON_SCROLL_BACK
|
||||
#define KBD_DOWN BUTTON_SCROLL_FWD
|
||||
|
||||
|
|
|
@ -148,13 +148,11 @@ bool remote_button_hold(void);
|
|||
|
||||
/* TODO: These codes should relate to the hardware */
|
||||
|
||||
#define BUTTON_MENU 0x0001
|
||||
#define BUTTON_PLAY 0x0002
|
||||
#define BUTTON_NEXT 0x0004
|
||||
#define BUTTON_PREV 0x0008
|
||||
#define BUTTON_SELECT 0x0010
|
||||
#define BUTTON_SCROLL_FWD 0x0020
|
||||
#define BUTTON_SCROLL_BACK 0x0040
|
||||
#define BUTTON_MENU 0x0002
|
||||
#define BUTTON_PLAY 0x0004
|
||||
#define BUTTON_SELECT 0x0008
|
||||
#define BUTTON_SCROLL_FWD 0x0010
|
||||
#define BUTTON_SCROLL_BACK 0x0020
|
||||
|
||||
#endif /* RECORDER/PLAYER/ONDIO/GMINI KEYPAD */
|
||||
|
||||
|
|
BIN
uisimulator/win32/UI-ipodcolor.bmp
Normal file
BIN
uisimulator/win32/UI-ipodcolor.bmp
Normal file
Binary file not shown.
After Width: | Height: | Size: 128 KiB |
|
@ -64,6 +64,8 @@ void button_event(int key, bool pressed)
|
|||
case VK_UP:
|
||||
#ifdef BUTTON_UP
|
||||
new_btn = BUTTON_UP;
|
||||
#elif defined BUTTON_SCROLL_FWD
|
||||
new_btn = BUTTON_SCROLL_FWD;
|
||||
#elif defined BUTTON_PLAY
|
||||
new_btn = BUTTON_PLAY;
|
||||
#endif
|
||||
|
@ -73,16 +75,20 @@ void button_event(int key, bool pressed)
|
|||
case VK_DOWN:
|
||||
#ifdef BUTTON_DOWN
|
||||
new_btn = BUTTON_DOWN;
|
||||
#elif defined BUTTON_SCROLL_BACK
|
||||
new_btn = BUTTON_SCROLL_BACK;
|
||||
#elif defined BUTTON_STOP
|
||||
new_btn = BUTTON_STOP;
|
||||
#endif
|
||||
break;
|
||||
|
||||
#ifdef BUTTON_ON
|
||||
case VK_ADD:
|
||||
#ifdef BUTTON_ON
|
||||
new_btn = BUTTON_ON;
|
||||
break;
|
||||
#elif defined(BUTTON_SELECT) && defined(BUTTON_PLAY)
|
||||
new_btn = BUTTON_PLAY;
|
||||
#endif
|
||||
break;
|
||||
|
||||
#ifdef BUTTON_OFF
|
||||
case VK_RETURN:
|
||||
|
@ -112,7 +118,7 @@ void button_event(int key, bool pressed)
|
|||
|
||||
case VK_NUMPAD5:
|
||||
case VK_SPACE:
|
||||
#ifdef BUTTON_PLAY
|
||||
#if defined(BUTTON_PLAY) && !defined(BUTTON_SELECT)
|
||||
new_btn = BUTTON_PLAY;
|
||||
#elif defined(BUTTON_SELECT)
|
||||
new_btn = BUTTON_SELECT;
|
||||
|
|
|
@ -97,7 +97,12 @@ void lcd_update_rect(int x_start, int y_start,
|
|||
#elif LCD_DEPTH == 2
|
||||
bitmap[y][x] = ((lcd_framebuffer[y/4][x] >> (2 * (y & 3))) & 3);
|
||||
#elif LCD_DEPTH == 16
|
||||
#if LCD_PIXELFORMAT == RGB565SWAPPED
|
||||
unsigned bits = lcd_framebuffer[y][x];
|
||||
bitmap[y][x] = (bits >> 8) | (bits << 8);
|
||||
#else
|
||||
bitmap[y][x] = lcd_framebuffer[y][x];
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
@ -109,6 +109,16 @@ typedef unsigned short wchar_t;
|
|||
#define UI_REMOTE_WIDTH 128
|
||||
#define UI_REMOTE_HEIGHT 64
|
||||
|
||||
#elif defined(IPOD_COLOR)
|
||||
#define UI_TITLE "iPod Color"
|
||||
#define UI_WIDTH 261 // width of GUI window
|
||||
#define UI_HEIGHT 493 // height of GUI window
|
||||
/* high-colour */
|
||||
#define UI_LCD_POSX 21 // x position of lcd
|
||||
#define UI_LCD_POSY 16 // y position of lcd
|
||||
#define UI_LCD_WIDTH 220
|
||||
#define UI_LCD_HEIGHT 176
|
||||
|
||||
#elif defined(ARCHOS_GMINI120)
|
||||
#define UI_TITLE "Gmini 120"
|
||||
#define UI_WIDTH 370 // width of GUI window
|
||||
|
|
Loading…
Reference in a new issue