summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--apps/gui/gwps.h12
-rw-r--r--apps/misc.c2
-rw-r--r--apps/recorder/keyboard.c4
-rw-r--r--firmware/export/button.h12
-rw-r--r--uisimulator/win32/UI-ipodcolor.bmpbin0 -> 131232 bytes
-rw-r--r--uisimulator/win32/button.c12
-rw-r--r--uisimulator/win32/lcd-win32.c5
-rw-r--r--uisimulator/win32/uisw32.h10
8 files changed, 38 insertions, 19 deletions
diff --git a/apps/gui/gwps.h b/apps/gui/gwps.h
index 7dcbcca76b..dfae7c34e2 100644
--- a/apps/gui/gwps.h
+++ b/apps/gui/gwps.h
@@ -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
diff --git a/apps/misc.c b/apps/misc.c
index 152914e4f0..8525904cc4 100644
--- a/apps/misc.c
+++ b/apps/misc.c
@@ -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
diff --git a/apps/recorder/keyboard.c b/apps/recorder/keyboard.c
index 31c0643e3c..fc3d1686a4 100644
--- a/apps/recorder/keyboard.c
+++ b/apps/recorder/keyboard.c
@@ -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
diff --git a/firmware/export/button.h b/firmware/export/button.h
index 8f70af793c..a0cbd78de6 100644
--- a/firmware/export/button.h
+++ b/firmware/export/button.h
@@ -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 */
diff --git a/uisimulator/win32/UI-ipodcolor.bmp b/uisimulator/win32/UI-ipodcolor.bmp
new file mode 100644
index 0000000000..de5dad4ffe
--- /dev/null
+++ b/uisimulator/win32/UI-ipodcolor.bmp
Binary files differ
diff --git a/uisimulator/win32/button.c b/uisimulator/win32/button.c
index 47adbb485f..579a74a78a 100644
--- a/uisimulator/win32/button.c
+++ b/uisimulator/win32/button.c
@@ -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;
diff --git a/uisimulator/win32/lcd-win32.c b/uisimulator/win32/lcd-win32.c
index f5672a58bf..e9bf1dacf8 100644
--- a/uisimulator/win32/lcd-win32.c
+++ b/uisimulator/win32/lcd-win32.c
@@ -97,8 +97,13 @@ 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
}
/* Invalidate only the window part that actually did change */
diff --git a/uisimulator/win32/uisw32.h b/uisimulator/win32/uisw32.h
index 7cbaa6ce47..af4a08ef95 100644
--- a/uisimulator/win32/uisw32.h
+++ b/uisimulator/win32/uisw32.h
@@ -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