diff options
| author | Jonathan Gordon <rockbox@jdgordon.info> | 2006-12-22 05:19:56 +0000 |
|---|---|---|
| committer | Jonathan Gordon <rockbox@jdgordon.info> | 2006-12-22 05:19:56 +0000 |
| commit | 7258b5e51a78e4d990bf1225c5893dc4b78d78b7 (patch) | |
| tree | 94e8ec97b9d08224aa31005d4a295c6d37649717 | |
| parent | 26b02415cbea9d1247319d4f6d41ea9f95c00e83 (diff) | |
| download | rockbox-7258b5e51a78e4d990bf1225c5893dc4b78d78b7.zip rockbox-7258b5e51a78e4d990bf1225c5893dc4b78d78b7.tar.gz rockbox-7258b5e51a78e4d990bf1225c5893dc4b78d78b7.tar.bz2 rockbox-7258b5e51a78e4d990bf1225c5893dc4b78d78b7.tar.xz | |
Make AB mode uable on the ipods. In AB mode select is used to set/reset
the markers in he WPS. AB mode must be disblaed ot get into the browser.
This can allow the Ondio's to have AB mode but it makes rombox too
large.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11832 a1c6a512-1295-4272-9138-f99709370657
| -rw-r--r-- | apps/action.h | 6 | ||||
| -rw-r--r-- | apps/gui/gwps.c | 42 | ||||
| -rw-r--r-- | firmware/export/config-ipod4g.h | 1 | ||||
| -rw-r--r-- | firmware/export/config-ipodcolor.h | 1 | ||||
| -rw-r--r-- | firmware/export/config-ipodmini.h | 1 | ||||
| -rwxr-xr-x | firmware/export/config-ipodmini2g.h | 1 | ||||
| -rw-r--r-- | firmware/export/config-ipodnano.h | 1 | ||||
| -rw-r--r-- | firmware/export/config-ipodvideo.h | 1 |
8 files changed, 33 insertions, 21 deletions
diff --git a/apps/action.h b/apps/action.h index b0725dd..5a8168e 100644 --- a/apps/action.h +++ b/apps/action.h @@ -111,7 +111,11 @@ enum { ACTION_WPS_CONTEXT, ACTION_WPS_QUICKSCREEN,/* optional */ ACTION_WPS_MENU, /*this should be the same as ACTION_STD_MENU */ - ACTION_WPSAB_SINGLE, /* No targets use this, but leave n just-in-case! */ +#if 0 + ACTION_WPSAB_SINGLE, /* This needs to be #defined in + the config-<target>.h to one of the ACTION_WPS_ actions + so it can be used */ +#endif ACTION_WPS_ABSETA_PREVDIR, /* these should be safe to put together seen as */ ACTION_WPS_ABSETB_NEXTDIR, /* you shouldnt want to change dir in ab-mode */ ACTION_WPSAB_RESET, diff --git a/apps/gui/gwps.c b/apps/gui/gwps.c index ec9a535..7128a95 100644 --- a/apps/gui/gwps.c +++ b/apps/gui/gwps.c @@ -208,7 +208,28 @@ long gui_wps_show(void) from F1 */ if (!audio_status()) exit = true; - +#ifdef ACTION_WPSAB_SINGLE + if (!global_settings.party_mode && ab_repeat_mode_enabled()) + { + static int wps_ab_state = 0; + if (button == ACTION_WPSAB_SINGLE) + { + switch (wps_ab_state) + { + case 0: /* set the A spot */ + button = ACTION_WPS_ABSETA_PREVDIR; + break; + case 1: /* set the B spot */ + button = ACTION_WPS_ABSETB_NEXTDIR; + break; + case 2: + button = ACTION_WPSAB_RESET; + break; + } + wps_ab_state = (wps_ab_state+1) % 3; + } + } +#endif switch(button) { case ACTION_WPS_CONTEXT: @@ -507,25 +528,6 @@ long gui_wps_show(void) #endif /* HAVE_PITCHSCREEN */ #ifdef AB_REPEAT_ENABLE - case ACTION_WPSAB_SINGLE: -/* If we are using the menu option to enable ab_repeat mode, don't do anything - * when it's disabled */ -#if (AB_REPEAT_ENABLE == 1) - if (!ab_repeat_mode_enabled()) - break; -#endif - if (ab_A_marker_set()) { - update_track = true; - if (ab_B_marker_set()) { - ab_reset_markers(); - break; - } - ab_set_B_marker(wps_state.id3->elapsed); - ab_jump_to_A_marker(); - break; - } - ab_set_A_marker(wps_state.id3->elapsed); - break; /* reset A&B markers */ case ACTION_WPSAB_RESET: if (ab_repeat_mode_enabled()) diff --git a/firmware/export/config-ipod4g.h b/firmware/export/config-ipod4g.h index 142a2eb..65d0df1 100644 --- a/firmware/export/config-ipod4g.h +++ b/firmware/export/config-ipod4g.h @@ -69,6 +69,7 @@ #define HAVE_WM8975 #define AB_REPEAT_ENABLE 1 +#define ACTION_WPSAB_SINGLE ACTION_WPS_BROWSE /* Define this for LCD backlight available */ #define CONFIG_BACKLIGHT BL_IPOD4G /* port controlled */ diff --git a/firmware/export/config-ipodcolor.h b/firmware/export/config-ipodcolor.h index af2a89c..36adcd2 100644 --- a/firmware/export/config-ipodcolor.h +++ b/firmware/export/config-ipodcolor.h @@ -60,6 +60,7 @@ #define HAVE_WM8975 #define AB_REPEAT_ENABLE 1 +#define ACTION_WPSAB_SINGLE ACTION_WPS_BROWSE /* Define this for LCD backlight available */ #define CONFIG_BACKLIGHT BL_IPOD4G /* port controlled */ diff --git a/firmware/export/config-ipodmini.h b/firmware/export/config-ipodmini.h index 6ffb863..d51d97a 100644 --- a/firmware/export/config-ipodmini.h +++ b/firmware/export/config-ipodmini.h @@ -63,6 +63,7 @@ #define HAVE_WM8721 /* actually WM8731 but no recording */ #define AB_REPEAT_ENABLE 1 +#define ACTION_WPSAB_SINGLE ACTION_WPS_BROWSE /* Define this for LCD backlight available */ #define CONFIG_BACKLIGHT BL_IPODMINI /* port controlled */ diff --git a/firmware/export/config-ipodmini2g.h b/firmware/export/config-ipodmini2g.h index c0822ba..edcf095 100755 --- a/firmware/export/config-ipodmini2g.h +++ b/firmware/export/config-ipodmini2g.h @@ -63,6 +63,7 @@ #define HAVE_WM8721 /* actually WM8731 but no recording */ #define AB_REPEAT_ENABLE 1 +#define ACTION_WPSAB_SINGLE ACTION_WPS_BROWSE /* Define this for LCD backlight available */ #define CONFIG_BACKLIGHT BL_IPODMINI /* port controlled */ diff --git a/firmware/export/config-ipodnano.h b/firmware/export/config-ipodnano.h index f72603a..e1b856e 100644 --- a/firmware/export/config-ipodnano.h +++ b/firmware/export/config-ipodnano.h @@ -60,6 +60,7 @@ #define HAVE_WM8975 #define AB_REPEAT_ENABLE 1 +#define ACTION_WPSAB_SINGLE ACTION_WPS_BROWSE /* Define this for LCD backlight available */ #define CONFIG_BACKLIGHT BL_IPODNANO /* port controlled */ diff --git a/firmware/export/config-ipodvideo.h b/firmware/export/config-ipodvideo.h index fa78c5c..1ed7f93 100644 --- a/firmware/export/config-ipodvideo.h +++ b/firmware/export/config-ipodvideo.h @@ -60,6 +60,7 @@ #define HAVE_WM8758 #define AB_REPEAT_ENABLE 1 +#define ACTION_WPSAB_SINGLE ACTION_WPS_BROWSE /* Define this for LCD backlight available */ #define CONFIG_BACKLIGHT BL_IPODNANO /* port controlled */ |