diff options
-rw-r--r-- | apps/gui/gwps.h | 12 | ||||
-rw-r--r-- | apps/misc.c | 2 | ||||
-rw-r--r-- | apps/recorder/keyboard.c | 4 | ||||
-rw-r--r-- | firmware/export/button.h | 12 | ||||
-rw-r--r-- | uisimulator/win32/UI-ipodcolor.bmp | bin | 0 -> 131232 bytes | |||
-rw-r--r-- | uisimulator/win32/button.c | 12 | ||||
-rw-r--r-- | uisimulator/win32/lcd-win32.c | 5 | ||||
-rw-r--r-- | uisimulator/win32/uisw32.h | 10 |
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 @@ | |||
176 | 176 | ||
177 | /* TODO: Check WPS button assignments */ | 177 | /* TODO: Check WPS button assignments */ |
178 | 178 | ||
179 | #define WPS_NEXT (BUTTON_NEXT | BUTTON_REL) | 179 | #define WPS_NEXT (BUTTON_RIGHT | BUTTON_REL) |
180 | #define WPS_NEXT_PRE BUTTON_PREV | 180 | #define WPS_NEXT_PRE BUTTON_RIGHT |
181 | #define WPS_PREV (BUTTON_PREV | BUTTON_REL) | 181 | #define WPS_PREV (BUTTON_LEFT | BUTTON_REL) |
182 | #define WPS_PREV_PRE BUTTON_PREV | 182 | #define WPS_PREV_PRE BUTTON_LEFT |
183 | #define WPS_FFWD (BUTTON_NEXT | BUTTON_REPEAT) | 183 | #define WPS_FFWD (BUTTON_RIGHT | BUTTON_REPEAT) |
184 | #define WPS_REW (BUTTON_PREV | BUTTON_REPEAT) | 184 | #define WPS_REW (BUTTON_LEFT | BUTTON_REPEAT) |
185 | #define WPS_INCVOL BUTTON_SCROLL_FWD | 185 | #define WPS_INCVOL BUTTON_SCROLL_FWD |
186 | #define WPS_DECVOL BUTTON_SCROLL_BACK | 186 | #define WPS_DECVOL BUTTON_SCROLL_BACK |
187 | #define WPS_PAUSE BUTTON_PLAY | BUTTON_REL | 187 | #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) | |||
381 | { | 381 | { |
382 | #if (LCD_PIXELFORMAT == RGB565SWAPPED) | 382 | #if (LCD_PIXELFORMAT == RGB565SWAPPED) |
383 | /* iPod LCD data is big endian although the CPU is not */ | 383 | /* iPod LCD data is big endian although the CPU is not */ |
384 | *dst++ = swap16(*src++); | 384 | *dst++ = htobe16(*src++); |
385 | #else | 385 | #else |
386 | *dst++ = htole16(*src++); | 386 | *dst++ = htole16(*src++); |
387 | #endif | 387 | #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 @@ | |||
106 | #define KBD_DONE (BUTTON_SELECT | BUTTON_REPEAT) | 106 | #define KBD_DONE (BUTTON_SELECT | BUTTON_REPEAT) |
107 | #define KBD_ABORT BUTTON_MENU | 107 | #define KBD_ABORT BUTTON_MENU |
108 | 108 | ||
109 | #define KBD_LEFT BUTTON_PREV | 109 | #define KBD_LEFT BUTTON_LEFT |
110 | #define KBD_RIGHT BUTTON_NEXT | 110 | #define KBD_RIGHT BUTTON_RIGHT |
111 | #define KBD_UP BUTTON_SCROLL_BACK | 111 | #define KBD_UP BUTTON_SCROLL_BACK |
112 | #define KBD_DOWN BUTTON_SCROLL_FWD | 112 | #define KBD_DOWN BUTTON_SCROLL_FWD |
113 | 113 | ||
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); | |||
148 | 148 | ||
149 | /* TODO: These codes should relate to the hardware */ | 149 | /* TODO: These codes should relate to the hardware */ |
150 | 150 | ||
151 | #define BUTTON_MENU 0x0001 | 151 | #define BUTTON_MENU 0x0002 |
152 | #define BUTTON_PLAY 0x0002 | 152 | #define BUTTON_PLAY 0x0004 |
153 | #define BUTTON_NEXT 0x0004 | 153 | #define BUTTON_SELECT 0x0008 |
154 | #define BUTTON_PREV 0x0008 | 154 | #define BUTTON_SCROLL_FWD 0x0010 |
155 | #define BUTTON_SELECT 0x0010 | 155 | #define BUTTON_SCROLL_BACK 0x0020 |
156 | #define BUTTON_SCROLL_FWD 0x0020 | ||
157 | #define BUTTON_SCROLL_BACK 0x0040 | ||
158 | 156 | ||
159 | #endif /* RECORDER/PLAYER/ONDIO/GMINI KEYPAD */ | 157 | #endif /* RECORDER/PLAYER/ONDIO/GMINI KEYPAD */ |
160 | 158 | ||
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) | |||
64 | case VK_UP: | 64 | case VK_UP: |
65 | #ifdef BUTTON_UP | 65 | #ifdef BUTTON_UP |
66 | new_btn = BUTTON_UP; | 66 | new_btn = BUTTON_UP; |
67 | #elif defined BUTTON_SCROLL_FWD | ||
68 | new_btn = BUTTON_SCROLL_FWD; | ||
67 | #elif defined BUTTON_PLAY | 69 | #elif defined BUTTON_PLAY |
68 | new_btn = BUTTON_PLAY; | 70 | new_btn = BUTTON_PLAY; |
69 | #endif | 71 | #endif |
@@ -73,16 +75,20 @@ void button_event(int key, bool pressed) | |||
73 | case VK_DOWN: | 75 | case VK_DOWN: |
74 | #ifdef BUTTON_DOWN | 76 | #ifdef BUTTON_DOWN |
75 | new_btn = BUTTON_DOWN; | 77 | new_btn = BUTTON_DOWN; |
78 | #elif defined BUTTON_SCROLL_BACK | ||
79 | new_btn = BUTTON_SCROLL_BACK; | ||
76 | #elif defined BUTTON_STOP | 80 | #elif defined BUTTON_STOP |
77 | new_btn = BUTTON_STOP; | 81 | new_btn = BUTTON_STOP; |
78 | #endif | 82 | #endif |
79 | break; | 83 | break; |
80 | 84 | ||
81 | #ifdef BUTTON_ON | ||
82 | case VK_ADD: | 85 | case VK_ADD: |
86 | #ifdef BUTTON_ON | ||
83 | new_btn = BUTTON_ON; | 87 | new_btn = BUTTON_ON; |
84 | break; | 88 | #elif defined(BUTTON_SELECT) && defined(BUTTON_PLAY) |
89 | new_btn = BUTTON_PLAY; | ||
85 | #endif | 90 | #endif |
91 | break; | ||
86 | 92 | ||
87 | #ifdef BUTTON_OFF | 93 | #ifdef BUTTON_OFF |
88 | case VK_RETURN: | 94 | case VK_RETURN: |
@@ -112,7 +118,7 @@ void button_event(int key, bool pressed) | |||
112 | 118 | ||
113 | case VK_NUMPAD5: | 119 | case VK_NUMPAD5: |
114 | case VK_SPACE: | 120 | case VK_SPACE: |
115 | #ifdef BUTTON_PLAY | 121 | #if defined(BUTTON_PLAY) && !defined(BUTTON_SELECT) |
116 | new_btn = BUTTON_PLAY; | 122 | new_btn = BUTTON_PLAY; |
117 | #elif defined(BUTTON_SELECT) | 123 | #elif defined(BUTTON_SELECT) |
118 | new_btn = BUTTON_SELECT; | 124 | 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, | |||
97 | #elif LCD_DEPTH == 2 | 97 | #elif LCD_DEPTH == 2 |
98 | bitmap[y][x] = ((lcd_framebuffer[y/4][x] >> (2 * (y & 3))) & 3); | 98 | bitmap[y][x] = ((lcd_framebuffer[y/4][x] >> (2 * (y & 3))) & 3); |
99 | #elif LCD_DEPTH == 16 | 99 | #elif LCD_DEPTH == 16 |
100 | #if LCD_PIXELFORMAT == RGB565SWAPPED | ||
101 | unsigned bits = lcd_framebuffer[y][x]; | ||
102 | bitmap[y][x] = (bits >> 8) | (bits << 8); | ||
103 | #else | ||
100 | bitmap[y][x] = lcd_framebuffer[y][x]; | 104 | bitmap[y][x] = lcd_framebuffer[y][x]; |
101 | #endif | 105 | #endif |
106 | #endif | ||
102 | } | 107 | } |
103 | 108 | ||
104 | /* Invalidate only the window part that actually did change */ | 109 | /* 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; | |||
109 | #define UI_REMOTE_WIDTH 128 | 109 | #define UI_REMOTE_WIDTH 128 |
110 | #define UI_REMOTE_HEIGHT 64 | 110 | #define UI_REMOTE_HEIGHT 64 |
111 | 111 | ||
112 | #elif defined(IPOD_COLOR) | ||
113 | #define UI_TITLE "iPod Color" | ||
114 | #define UI_WIDTH 261 // width of GUI window | ||
115 | #define UI_HEIGHT 493 // height of GUI window | ||
116 | /* high-colour */ | ||
117 | #define UI_LCD_POSX 21 // x position of lcd | ||
118 | #define UI_LCD_POSY 16 // y position of lcd | ||
119 | #define UI_LCD_WIDTH 220 | ||
120 | #define UI_LCD_HEIGHT 176 | ||
121 | |||
112 | #elif defined(ARCHOS_GMINI120) | 122 | #elif defined(ARCHOS_GMINI120) |
113 | #define UI_TITLE "Gmini 120" | 123 | #define UI_TITLE "Gmini 120" |
114 | #define UI_WIDTH 370 // width of GUI window | 124 | #define UI_WIDTH 370 // width of GUI window |