diff options
| author | Zakk Roberts <midk@rockbox.org> | 2006-04-10 03:51:17 +0000 |
|---|---|---|
| committer | Zakk Roberts <midk@rockbox.org> | 2006-04-10 03:51:17 +0000 |
| commit | 2f943b054c4eb630c9b5b7170da38e494c1be235 (patch) | |
| tree | a72d3e22c88f7ddb67e9a8d01a94e9927001c702 | |
| parent | bf6f9c66a158a478d639672857bbf9bac791dd30 (diff) | |
| download | rockbox-2f943b054c4eb630c9b5b7170da38e494c1be235.zip rockbox-2f943b054c4eb630c9b5b7170da38e494c1be235.tar.gz rockbox-2f943b054c4eb630c9b5b7170da38e494c1be235.tar.bz2 rockbox-2f943b054c4eb630c9b5b7170da38e494c1be235.tar.xz | |
Enabled the quickscreen for iAudio X5. Globally, REC enters the menu and holding REC enters the quickscreen. Also moved the quickscreen #define to model config files, which simplifies the checking for it and makes checking more consistent. Cleaned up keymappings in quickscreen.h.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9590 a1c6a512-1295-4272-9138-f99709370657
| -rw-r--r-- | apps/gui/gwps.c | 4 | ||||
| -rw-r--r-- | apps/gui/gwps.h | 4 | ||||
| -rw-r--r-- | apps/gui/quickscreen.c | 7 | ||||
| -rw-r--r-- | apps/gui/quickscreen.h | 33 | ||||
| -rw-r--r-- | apps/screens.c | 5 | ||||
| -rw-r--r-- | apps/tree.c | 14 | ||||
| -rw-r--r-- | apps/tree.h | 11 | ||||
| -rw-r--r-- | firmware/export/config-fmrecorder.h | 3 | ||||
| -rw-r--r-- | firmware/export/config-h100.h | 3 | ||||
| -rw-r--r-- | firmware/export/config-h120.h | 3 | ||||
| -rw-r--r-- | firmware/export/config-h300.h | 3 | ||||
| -rw-r--r-- | firmware/export/config-iaudiox5.h | 3 | ||||
| -rw-r--r-- | firmware/export/config-ipod3g.h | 3 | ||||
| -rw-r--r-- | firmware/export/config-ipod4g.h | 3 | ||||
| -rw-r--r-- | firmware/export/config-ipodcolor.h | 3 | ||||
| -rw-r--r-- | firmware/export/config-ipodmini.h | 3 | ||||
| -rwxr-xr-x | firmware/export/config-ipodmini2g.h | 3 | ||||
| -rw-r--r-- | firmware/export/config-ipodnano.h | 7 | ||||
| -rw-r--r-- | firmware/export/config-ipodvideo.h | 5 | ||||
| -rw-r--r-- | firmware/export/config-recorder.h | 3 | ||||
| -rw-r--r-- | firmware/export/config-recorderv2.h | 3 |
21 files changed, 81 insertions, 45 deletions
diff --git a/apps/gui/gwps.c b/apps/gui/gwps.c index a43f2e4..db92961 100644 --- a/apps/gui/gwps.c +++ b/apps/gui/gwps.c @@ -569,9 +569,7 @@ long gui_wps_show(void) break; #endif -#if (CONFIG_KEYPAD == RECORDER_PAD) || (CONFIG_KEYPAD == IRIVER_H100_PAD) ||\ - (CONFIG_KEYPAD == IRIVER_H300_PAD) || (CONFIG_KEYPAD == IPOD_3G_PAD) ||\ - (CONFIG_KEYPAD == IPOD_4G_PAD) +#ifdef HAVE_QUICKSCREEN /* play settings */ case WPS_QUICK: #ifdef WPS_RC_QUICK diff --git a/apps/gui/gwps.h b/apps/gui/gwps.h index cce2a2b..d9f7224 100644 --- a/apps/gui/gwps.h +++ b/apps/gui/gwps.h @@ -236,11 +236,13 @@ #define WPS_INCVOL BUTTON_UP #define WPS_DECVOL BUTTON_DOWN #define WPS_PAUSE BUTTON_PLAY -#define WPS_MENU BUTTON_REC +#define WPS_MENU (BUTTON_REC|BUTTON_REL) +#define WPS_MENU_PRE BUTTON_REC #define WPS_BROWSE (BUTTON_SELECT | BUTTON_REL) #define WPS_BROWSE_PRE BUTTON_SELECT #define WPS_EXIT (BUTTON_PLAY | BUTTON_REPEAT) #define WPS_CONTEXT (BUTTON_SELECT | BUTTON_REPEAT) +#define WPS_QUICK (BUTTON_REC | BUTTON_REPEAT) #elif CONFIG_KEYPAD == GIGABEAT_PAD diff --git a/apps/gui/quickscreen.c b/apps/gui/quickscreen.c index 24ab725..981199d 100644 --- a/apps/gui/quickscreen.c +++ b/apps/gui/quickscreen.c @@ -18,7 +18,8 @@ ****************************************************************************/ #include "quickscreen.h" -#ifdef HAS_QUICKSCREEN + +#ifdef HAVE_QUICKSCREEN #include <stdio.h> #include "system.h" @@ -83,7 +84,7 @@ void gui_quickscreen_draw(struct gui_quickscreen * qs, struct screen * display) else { display->putsxy(display->width - w - 12, 24, line_text); - display->mono_bitmap(bitmap_icons_7x8[Icon_FastForward], + display->mono_bitmap(bitmap_icons_7x8[Icon_FastForward], display->width - 8, 24, 7, 8); } display->getstringsize(option, &w, NULL); @@ -217,5 +218,5 @@ bool gui_syncquickscreen_run(struct gui_quickscreen * qs, int button_enter) } } -#endif /* HAS_QUICKSCREEN */ +#endif /* HAVE_QUICKSCREEN */ diff --git a/apps/gui/quickscreen.h b/apps/gui/quickscreen.h index e6e04c9..55e5a2d 100644 --- a/apps/gui/quickscreen.h +++ b/apps/gui/quickscreen.h @@ -18,32 +18,26 @@ ****************************************************************************/ #include "button.h" #include "config.h" -#if (CONFIG_KEYPAD == RECORDER_PAD) || (CONFIG_KEYPAD == IRIVER_H100_PAD) ||\ - (CONFIG_KEYPAD == IRIVER_H300_PAD) || (CONFIG_KEYPAD == IPOD_4G_PAD) ||\ - (CONFIG_KEYPAD == IPOD_3G_PAD) + +#ifdef HAVE_QUICKSCREEN #ifndef _GUI_QUICKSCREEN_H_ #define _GUI_QUICKSCREEN_H_ -#define HAS_QUICKSCREEN - #include "option_select.h" #include "screen_access.h" #define QUICKSCREEN_LEFT BUTTON_LEFT #define QUICKSCREEN_RIGHT BUTTON_RIGHT -#if (CONFIG_KEYPAD == IRIVER_H100_PAD) || (CONFIG_KEYPAD == IRIVER_H300_PAD) ||\ - (CONFIG_KEYPAD == RECORDER_PAD) +#if (CONFIG_KEYPAD == RECORDER_PAD) +#define QUICKSCREEN_BOTTOM BUTTON_DOWN +#define QUICKSCREEN_BOTTOM_INV BUTTON_UP +#define QUICKSCREEN_QUIT BUTTON_F3 +#define QUICKSCREEN_QUIT2 BUTTON_OFF +#elif (CONFIG_KEYPAD == IRIVER_H100_PAD) || (CONFIG_KEYPAD == IRIVER_H300_PAD) #define QUICKSCREEN_BOTTOM BUTTON_DOWN #define QUICKSCREEN_BOTTOM_INV BUTTON_UP -#elif (CONFIG_KEYPAD == IPOD_4G_PAD) || (CONFIG_KEYPAD == IPOD_3G_PAD) -#define QUICKSCREEN_BOTTOM BUTTON_PLAY -#define QUICKSCREEN_QUIT BUTTON_MENU -#define QUICKSCREEN_QUIT2 BUTTON_SELECT -#endif - -#if (CONFIG_KEYPAD == IRIVER_H100_PAD) || (CONFIG_KEYPAD == IRIVER_H300_PAD) #define QUICKSCREEN_QUIT BUTTON_MODE #define QUICKSCREEN_QUIT2 BUTTON_OFF #define QUICKSCREEN_RC_QUIT BUTTON_RC_MODE @@ -53,7 +47,14 @@ #define QUICKSCREEN_RC_BOTTOM_INV BUTTON_RC_VOL_UP #define QUICKSCREEN_RC_RIGHT BUTTON_RC_FF #endif - +#elif (CONFIG_KEYPAD == IPOD_4G_PAD) || (CONFIG_KEYPAD == IPOD_3G_PAD) +#define QUICKSCREEN_BOTTOM BUTTON_PLAY +#define QUICKSCREEN_QUIT BUTTON_MENU +#define QUICKSCREEN_QUIT2 BUTTON_SELECT +#elif (CONFIG_KEYPAD == IAUDIO_X5_PAD) +#define QUICKSCREEN_BOTTOM BUTTON_DOWN +#define QUICKSCREEN_QUIT BUTTON_REC +#define QUICKSCREEN_QUIT2 BUTTON_POWER #endif struct gui_quickscreen; @@ -118,4 +119,4 @@ void gui_syncquickscreen_draw(struct gui_quickscreen * qs); bool gui_syncquickscreen_run(struct gui_quickscreen * qs, int button_enter); #endif /*_GUI_QUICK_SCREEN_H_*/ -#endif /* CONFIG_KEYPAD */ +#endif /* HAVE_QUICKSCREEN */ diff --git a/apps/screens.c b/apps/screens.c index 4da5677..5d1a3f0 100644 --- a/apps/screens.c +++ b/apps/screens.c @@ -460,9 +460,8 @@ bool pitch_screen(void) } #endif -#if (CONFIG_KEYPAD == RECORDER_PAD) || (CONFIG_KEYPAD == IRIVER_H100_PAD) ||\ - (CONFIG_KEYPAD == IRIVER_H300_PAD) || (CONFIG_KEYPAD == IPOD_4G_PAD) ||\ - (CONFIG_KEYPAD == IPOD_3G_PAD) +#ifdef HAVE_QUICKSCREEN + #define bool_to_int(b)\ b?1:0 #define int_to_bool(i)\ diff --git a/apps/tree.c b/apps/tree.c index f523b1c..2777970 100644 --- a/apps/tree.c +++ b/apps/tree.c @@ -365,7 +365,7 @@ static int update_dir(void) void resume_directory(const char *dir) { bool id3db = *tc.dirfilter == SHOW_ID3DB; - + if (ft_load(&tc, dir) < 0) return; lastdir[0] = 0; @@ -460,7 +460,7 @@ void set_current_file(char *path) } strcpy(lastfile, name); - + /* undefined item selected */ tc.selected_item = -1; @@ -641,7 +641,7 @@ static bool dirbrowse(void) } #if defined(HAVE_CHARGING) && \ (CONFIG_KEYPAD == RECORDER_PAD) && !defined(HAVE_SW_POWEROFF) - else { + else { if (!charger_inserted()) { if(shutdown_screen()) reload_dir = true; @@ -719,7 +719,7 @@ static bool dirbrowse(void) } break; -#ifdef TREE_QUICK +#ifdef HAVE_QUICKSCREEN case TREE_QUICK: #ifdef TREE_RC_QUICK case TREE_RC_QUICK: @@ -905,7 +905,7 @@ static bool dirbrowse(void) lastextra = -1; reload_root = false; } - + if (! reload_dir ) { gui_synclist_select_item(&tree_lists, 0); @@ -1073,7 +1073,7 @@ static bool add_dir(char* dirname, int len, int fd) plsize++; if(TIME_AFTER(current_tick, pltick+HZ/4)) { pltick = current_tick; - + snprintf(buf, sizeof buf, "%d", plsize); #ifdef HAVE_LCD_BITMAP FOR_NB_SCREENS(i) @@ -1117,7 +1117,7 @@ bool create_playlist(void) char filename[MAX_PATH]; pltick = current_tick; - + snprintf(filename, sizeof filename, "%s.m3u", tc.currdir[1] ? tc.currdir : "/root"); FOR_NB_SCREENS(i) diff --git a/apps/tree.h b/apps/tree.h index c811b5d..29532b5 100644 --- a/apps/tree.h +++ b/apps/tree.h @@ -37,7 +37,6 @@ #define TREE_WPS_PRE BUTTON_ON #define TREE_CONTEXT (BUTTON_SELECT | BUTTON_REPEAT) #define TREE_CONTEXT2 (BUTTON_ON | BUTTON_SELECT) -#define TREE_POWER_BTN BUTTON_ON #define TREE_QUICK (BUTTON_MODE | BUTTON_REPEAT) /* Remote keys */ @@ -67,7 +66,6 @@ #define TREE_WPS_PRE BUTTON_ON #define TREE_CONTEXT (BUTTON_PLAY | BUTTON_REPEAT) #define TREE_CONTEXT2 (BUTTON_ON | BUTTON_PLAY) -#define TREE_POWER_BTN BUTTON_ON #define TREE_QUICK BUTTON_F2 #define TREE_RC_NEXT BUTTON_RC_RIGHT @@ -85,7 +83,6 @@ #define TREE_WPS_PRE BUTTON_ON #define TREE_CONTEXT (BUTTON_PLAY | BUTTON_REPEAT) #define TREE_CONTEXT2 (BUTTON_ON | BUTTON_PLAY) -#define TREE_POWER_BTN BUTTON_ON #define TREE_RC_NEXT BUTTON_RC_RIGHT #define TREE_RC_PREV BUTTON_RC_LEFT @@ -103,7 +100,6 @@ #define TREE_WPS (BUTTON_MENU | BUTTON_REL) #define TREE_WPS_PRE BUTTON_MENU #define TREE_CONTEXT (BUTTON_RIGHT | BUTTON_REPEAT) -#define TREE_POWER_BTN BUTTON_OFF #elif CONFIG_KEYPAD == GMINI100_PAD #define TREE_EXIT BUTTON_LEFT @@ -115,7 +111,6 @@ #define TREE_WPS_PRE BUTTON_ON #define TREE_CONTEXT (BUTTON_PLAY | BUTTON_REPEAT) #define TREE_CONTEXT2 (BUTTON_ON | BUTTON_PLAY) -#define TREE_POWER_BTN BUTTON_ON #elif (CONFIG_KEYPAD == IPOD_3G_PAD) || (CONFIG_KEYPAD == IPOD_4G_PAD) @@ -142,7 +137,6 @@ #define TREE_WPS (BUTTON_SELECT | BUTTON_REL) #define TREE_WPS_PRE BUTTON_SELECT #define TREE_CONTEXT (BUTTON_RIGHT | BUTTON_REPEAT) -#define TREE_POWER_BTN (BUTTON_PLAY | BUTTON_REPEAT) #elif CONFIG_KEYPAD == IAUDIO_X5_PAD @@ -151,12 +145,12 @@ #define TREE_ENTER BUTTON_RIGHT #define TREE_RUN (BUTTON_SELECT | BUTTON_REL) #define TREE_RUN_PRE BUTTON_SELECT -#define TREE_MENU (BUTTON_REC | BUTTON_REPEAT) +#define TREE_MENU (BUTTON_REC | BUTTON_REL) #define TREE_MENU_PRE BUTTON_REC #define TREE_WPS (BUTTON_PLAY | BUTTON_REL) #define TREE_WPS_PRE BUTTON_PLAY #define TREE_CONTEXT (BUTTON_SELECT | BUTTON_REPEAT) -#define TREE_POWER_BTN (BUTTON_REC | BUTTON_REPEAT) +#define TREE_QUICK (BUTTON_REC | BUTTON_REPEAT) #elif CONFIG_KEYPAD == GIGABEAT_PAD @@ -172,7 +166,6 @@ #define TREE_WPS (BUTTON_POWER | BUTTON_REL) #define TREE_WPS_PRE BUTTON_POWER #define TREE_CONTEXT (BUTTON_SELECT | BUTTON_REPEAT) -#define TREE_POWER_BTN BUTTON_POWER #endif diff --git a/firmware/export/config-fmrecorder.h b/firmware/export/config-fmrecorder.h index 335d3ea..27e2f10 100644 --- a/firmware/export/config-fmrecorder.h +++ b/firmware/export/config-fmrecorder.h @@ -7,6 +7,9 @@ /* define this if you can flip your LCD */ #define HAVE_LCD_FLIP +/* define this if you have access to the quickscreen */ +#define HAVE_QUICKSCREEN + /* LCD dimensions */ #define LCD_WIDTH 112 #define LCD_HEIGHT 64 diff --git a/firmware/export/config-h100.h b/firmware/export/config-h100.h index 5042c54..20fcb75 100644 --- a/firmware/export/config-h100.h +++ b/firmware/export/config-h100.h @@ -16,6 +16,9 @@ /* define this if you can flip your LCD */ #define HAVE_LCD_FLIP +/* define this if you have access to the quickscreen */ +#define HAVE_QUICKSCREEN + /* LCD dimensions */ #define LCD_WIDTH 160 #define LCD_HEIGHT 128 diff --git a/firmware/export/config-h120.h b/firmware/export/config-h120.h index 0c8eec0..34c10b7 100644 --- a/firmware/export/config-h120.h +++ b/firmware/export/config-h120.h @@ -12,6 +12,9 @@ /* define this if you can flip your LCD */ #define HAVE_LCD_FLIP +/* define this if you have access to the quickscreen */ +#define HAVE_QUICKSCREEN + /* LCD dimensions */ #define LCD_WIDTH 160 #define LCD_HEIGHT 128 diff --git a/firmware/export/config-h300.h b/firmware/export/config-h300.h index d9260e6..41e3c82 100644 --- a/firmware/export/config-h300.h +++ b/firmware/export/config-h300.h @@ -15,6 +15,9 @@ /* define this if you can flip your LCD */ #define HAVE_LCD_FLIP +/* define this if you have access to the quickscreen */ +#define HAVE_QUICKSCREEN + /* LCD dimensions */ #define LCD_WIDTH 220 #define LCD_HEIGHT 176 diff --git a/firmware/export/config-iaudiox5.h b/firmware/export/config-iaudiox5.h index c4e7e50..746ca26 100644 --- a/firmware/export/config-iaudiox5.h +++ b/firmware/export/config-iaudiox5.h @@ -14,6 +14,9 @@ /* define this if you have a colour LCD */ #define HAVE_LCD_COLOR 1 +/* define this if you have access to the quickscreen */ +#define HAVE_QUICKSCREEN + /* LCD dimensions */ #define LCD_WIDTH 160 #define LCD_HEIGHT 128 diff --git a/firmware/export/config-ipod3g.h b/firmware/export/config-ipod3g.h index ad555d8..2b7005d 100644 --- a/firmware/export/config-ipod3g.h +++ b/firmware/export/config-ipod3g.h @@ -12,6 +12,9 @@ /* define this if you have a bitmap LCD display */ #define HAVE_LCD_BITMAP 1 +/* define this if you have access to the quickscreen */ +#define HAVE_QUICKSCREEN + /* LCD dimensions */ #define LCD_WIDTH 160 #define LCD_HEIGHT 128 diff --git a/firmware/export/config-ipod4g.h b/firmware/export/config-ipod4g.h index 832f3f4..9abc6b3 100644 --- a/firmware/export/config-ipod4g.h +++ b/firmware/export/config-ipod4g.h @@ -12,6 +12,9 @@ /* define this if you have a bitmap LCD display */ #define HAVE_LCD_BITMAP 1 +/* define this if you have access to the quickscreen */ +#define HAVE_QUICKSCREEN + /* LCD dimensions */ #define LCD_WIDTH 160 #define LCD_HEIGHT 128 diff --git a/firmware/export/config-ipodcolor.h b/firmware/export/config-ipodcolor.h index afe1a06..1d88f0d 100644 --- a/firmware/export/config-ipodcolor.h +++ b/firmware/export/config-ipodcolor.h @@ -15,6 +15,9 @@ /* define this if you have a colour LCD */ #define HAVE_LCD_COLOR 1 +/* define this if you have access to the quickscreen */ +#define HAVE_QUICKSCREEN + /* LCD dimensions */ #define LCD_WIDTH 220 #define LCD_HEIGHT 176 diff --git a/firmware/export/config-ipodmini.h b/firmware/export/config-ipodmini.h index 146a212..7018c4e 100644 --- a/firmware/export/config-ipodmini.h +++ b/firmware/export/config-ipodmini.h @@ -12,6 +12,9 @@ /* define this if you have a bitmap LCD display */ #define HAVE_LCD_BITMAP 1 +/* define this if you have access to the quickscreen */ +#define HAVE_QUICKSCREEN + /* LCD dimensions */ #define LCD_WIDTH 138 #define LCD_HEIGHT 110 diff --git a/firmware/export/config-ipodmini2g.h b/firmware/export/config-ipodmini2g.h index c3b7a67..881e4d2 100755 --- a/firmware/export/config-ipodmini2g.h +++ b/firmware/export/config-ipodmini2g.h @@ -12,6 +12,9 @@ /* define this if you have a bitmap LCD display */ #define HAVE_LCD_BITMAP 1 +/* define this if you have access to the quickscreen */ +#define HAVE_QUICKSCREEN + /* LCD dimensions */ #define LCD_WIDTH 138 #define LCD_HEIGHT 110 diff --git a/firmware/export/config-ipodnano.h b/firmware/export/config-ipodnano.h index c3b0745..98e307f 100644 --- a/firmware/export/config-ipodnano.h +++ b/firmware/export/config-ipodnano.h @@ -15,6 +15,9 @@ /* define this if you have a colour LCD */ #define HAVE_LCD_COLOR 1 +/* define this if you have access to the quickscreen */ +#define HAVE_QUICKSCREEN + /* LCD dimensions */ #define LCD_WIDTH 176 #define LCD_HEIGHT 132 @@ -53,7 +56,7 @@ #ifndef SIMULATOR -/* The Nano actually has a PP5021 - but it's register compatible with +/* The Nano actually has a PP5021 - but it's register compatible with the 5020 so Rockbox doesn't care. */ /* Define this if you have a PortalPlayer PP5020 */ #define CONFIG_CPU PP5020 @@ -64,7 +67,7 @@ /* Type of mobile power */ #define CONFIG_BATTERY BATT_LIPOL1300 -#define BATTERY_SCALE_FACTOR 5865 +#define BATTERY_SCALE_FACTOR 5865 /* Define this if the platform can charge batteries */ //#define HAVE_CHARGING 1 diff --git a/firmware/export/config-ipodvideo.h b/firmware/export/config-ipodvideo.h index d13727f..1f57432 100644 --- a/firmware/export/config-ipodvideo.h +++ b/firmware/export/config-ipodvideo.h @@ -15,6 +15,9 @@ /* define this if you have a colour LCD */ #define HAVE_LCD_COLOR 1 +/* define this if you have access to the quickscreen */ +#define HAVE_QUICKSCREEN + /* LCD dimensions */ #define LCD_WIDTH 320 #define LCD_HEIGHT 240 @@ -53,7 +56,7 @@ #ifndef SIMULATOR -/* The Nano actually has a PP5021 - but it's register compatible with +/* The Nano actually has a PP5021 - but it's register compatible with the 5020 so Rockbox doesn't care. */ /* Define this if you have a PortalPlayer PP5020 */ #define CONFIG_CPU PP5020 diff --git a/firmware/export/config-recorder.h b/firmware/export/config-recorder.h index d727519..130e199 100644 --- a/firmware/export/config-recorder.h +++ b/firmware/export/config-recorder.h @@ -7,6 +7,9 @@ /* define this if you can flip your LCD */ #define HAVE_LCD_FLIP +/* define this if you have access to the quickscreen */ +#define HAVE_QUICKSCREEN + /* LCD dimensions */ #define LCD_WIDTH 112 #define LCD_HEIGHT 64 diff --git a/firmware/export/config-recorderv2.h b/firmware/export/config-recorderv2.h index 5548c07..b3136f1 100644 --- a/firmware/export/config-recorderv2.h +++ b/firmware/export/config-recorderv2.h @@ -7,6 +7,9 @@ /* define this if you can flip your LCD */ #define HAVE_LCD_FLIP +/* define this if you have access to the quickscreen */ +#define HAVE_QUICKSCREEN + /* LCD dimensions */ #define LCD_WIDTH 112 #define LCD_HEIGHT 64 |