summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Gordon <rockbox@jdgordon.info>2006-12-22 05:19:56 +0000
committerJonathan Gordon <rockbox@jdgordon.info>2006-12-22 05:19:56 +0000
commit7258b5e51a78e4d990bf1225c5893dc4b78d78b7 (patch)
tree94e8ec97b9d08224aa31005d4a295c6d37649717
parent26b02415cbea9d1247319d4f6d41ea9f95c00e83 (diff)
downloadrockbox-7258b5e51a78e4d990bf1225c5893dc4b78d78b7.tar.gz
rockbox-7258b5e51a78e4d990bf1225c5893dc4b78d78b7.zip
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.h6
-rw-r--r--apps/gui/gwps.c42
-rw-r--r--firmware/export/config-ipod4g.h1
-rw-r--r--firmware/export/config-ipodcolor.h1
-rw-r--r--firmware/export/config-ipodmini.h1
-rwxr-xr-xfirmware/export/config-ipodmini2g.h1
-rw-r--r--firmware/export/config-ipodnano.h1
-rw-r--r--firmware/export/config-ipodvideo.h1
8 files changed, 33 insertions, 21 deletions
diff --git a/apps/action.h b/apps/action.h
index b0725ddb41..5a8168ea80 100644
--- a/apps/action.h
+++ b/apps/action.h
@@ -111,7 +111,11 @@ enum {
111 ACTION_WPS_CONTEXT, 111 ACTION_WPS_CONTEXT,
112 ACTION_WPS_QUICKSCREEN,/* optional */ 112 ACTION_WPS_QUICKSCREEN,/* optional */
113 ACTION_WPS_MENU, /*this should be the same as ACTION_STD_MENU */ 113 ACTION_WPS_MENU, /*this should be the same as ACTION_STD_MENU */
114 ACTION_WPSAB_SINGLE, /* No targets use this, but leave n just-in-case! */ 114#if 0
115 ACTION_WPSAB_SINGLE, /* This needs to be #defined in
116 the config-<target>.h to one of the ACTION_WPS_ actions
117 so it can be used */
118#endif
115 ACTION_WPS_ABSETA_PREVDIR, /* these should be safe to put together seen as */ 119 ACTION_WPS_ABSETA_PREVDIR, /* these should be safe to put together seen as */
116 ACTION_WPS_ABSETB_NEXTDIR, /* you shouldnt want to change dir in ab-mode */ 120 ACTION_WPS_ABSETB_NEXTDIR, /* you shouldnt want to change dir in ab-mode */
117 ACTION_WPSAB_RESET, 121 ACTION_WPSAB_RESET,
diff --git a/apps/gui/gwps.c b/apps/gui/gwps.c
index ec9a5351ea..7128a958f7 100644
--- a/apps/gui/gwps.c
+++ b/apps/gui/gwps.c
@@ -208,7 +208,28 @@ long gui_wps_show(void)
208 from F1 */ 208 from F1 */
209 if (!audio_status()) 209 if (!audio_status())
210 exit = true; 210 exit = true;
211 211#ifdef ACTION_WPSAB_SINGLE
212 if (!global_settings.party_mode && ab_repeat_mode_enabled())
213 {
214 static int wps_ab_state = 0;
215 if (button == ACTION_WPSAB_SINGLE)
216 {
217 switch (wps_ab_state)
218 {
219 case 0: /* set the A spot */
220 button = ACTION_WPS_ABSETA_PREVDIR;
221 break;
222 case 1: /* set the B spot */
223 button = ACTION_WPS_ABSETB_NEXTDIR;
224 break;
225 case 2:
226 button = ACTION_WPSAB_RESET;
227 break;
228 }
229 wps_ab_state = (wps_ab_state+1) % 3;
230 }
231 }
232#endif
212 switch(button) 233 switch(button)
213 { 234 {
214 case ACTION_WPS_CONTEXT: 235 case ACTION_WPS_CONTEXT:
@@ -507,25 +528,6 @@ long gui_wps_show(void)
507#endif /* HAVE_PITCHSCREEN */ 528#endif /* HAVE_PITCHSCREEN */
508 529
509#ifdef AB_REPEAT_ENABLE 530#ifdef AB_REPEAT_ENABLE
510 case ACTION_WPSAB_SINGLE:
511/* If we are using the menu option to enable ab_repeat mode, don't do anything
512 * when it's disabled */
513#if (AB_REPEAT_ENABLE == 1)
514 if (!ab_repeat_mode_enabled())
515 break;
516#endif
517 if (ab_A_marker_set()) {
518 update_track = true;
519 if (ab_B_marker_set()) {
520 ab_reset_markers();
521 break;
522 }
523 ab_set_B_marker(wps_state.id3->elapsed);
524 ab_jump_to_A_marker();
525 break;
526 }
527 ab_set_A_marker(wps_state.id3->elapsed);
528 break;
529 /* reset A&B markers */ 531 /* reset A&B markers */
530 case ACTION_WPSAB_RESET: 532 case ACTION_WPSAB_RESET:
531 if (ab_repeat_mode_enabled()) 533 if (ab_repeat_mode_enabled())
diff --git a/firmware/export/config-ipod4g.h b/firmware/export/config-ipod4g.h
index 142a2ebabb..65d0df1b87 100644
--- a/firmware/export/config-ipod4g.h
+++ b/firmware/export/config-ipod4g.h
@@ -69,6 +69,7 @@
69#define HAVE_WM8975 69#define HAVE_WM8975
70 70
71#define AB_REPEAT_ENABLE 1 71#define AB_REPEAT_ENABLE 1
72#define ACTION_WPSAB_SINGLE ACTION_WPS_BROWSE
72 73
73/* Define this for LCD backlight available */ 74/* Define this for LCD backlight available */
74#define CONFIG_BACKLIGHT BL_IPOD4G /* port controlled */ 75#define CONFIG_BACKLIGHT BL_IPOD4G /* port controlled */
diff --git a/firmware/export/config-ipodcolor.h b/firmware/export/config-ipodcolor.h
index af2a89cf6f..36adcd22c2 100644
--- a/firmware/export/config-ipodcolor.h
+++ b/firmware/export/config-ipodcolor.h
@@ -60,6 +60,7 @@
60#define HAVE_WM8975 60#define HAVE_WM8975
61 61
62#define AB_REPEAT_ENABLE 1 62#define AB_REPEAT_ENABLE 1
63#define ACTION_WPSAB_SINGLE ACTION_WPS_BROWSE
63 64
64/* Define this for LCD backlight available */ 65/* Define this for LCD backlight available */
65#define CONFIG_BACKLIGHT BL_IPOD4G /* port controlled */ 66#define CONFIG_BACKLIGHT BL_IPOD4G /* port controlled */
diff --git a/firmware/export/config-ipodmini.h b/firmware/export/config-ipodmini.h
index 6ffb8637ff..d51d97a073 100644
--- a/firmware/export/config-ipodmini.h
+++ b/firmware/export/config-ipodmini.h
@@ -63,6 +63,7 @@
63#define HAVE_WM8721 /* actually WM8731 but no recording */ 63#define HAVE_WM8721 /* actually WM8731 but no recording */
64 64
65#define AB_REPEAT_ENABLE 1 65#define AB_REPEAT_ENABLE 1
66#define ACTION_WPSAB_SINGLE ACTION_WPS_BROWSE
66 67
67/* Define this for LCD backlight available */ 68/* Define this for LCD backlight available */
68#define CONFIG_BACKLIGHT BL_IPODMINI /* port controlled */ 69#define CONFIG_BACKLIGHT BL_IPODMINI /* port controlled */
diff --git a/firmware/export/config-ipodmini2g.h b/firmware/export/config-ipodmini2g.h
index c0822baef4..edcf095c13 100755
--- a/firmware/export/config-ipodmini2g.h
+++ b/firmware/export/config-ipodmini2g.h
@@ -63,6 +63,7 @@
63#define HAVE_WM8721 /* actually WM8731 but no recording */ 63#define HAVE_WM8721 /* actually WM8731 but no recording */
64 64
65#define AB_REPEAT_ENABLE 1 65#define AB_REPEAT_ENABLE 1
66#define ACTION_WPSAB_SINGLE ACTION_WPS_BROWSE
66 67
67/* Define this for LCD backlight available */ 68/* Define this for LCD backlight available */
68#define CONFIG_BACKLIGHT BL_IPODMINI /* port controlled */ 69#define CONFIG_BACKLIGHT BL_IPODMINI /* port controlled */
diff --git a/firmware/export/config-ipodnano.h b/firmware/export/config-ipodnano.h
index f72603a2da..e1b856eed8 100644
--- a/firmware/export/config-ipodnano.h
+++ b/firmware/export/config-ipodnano.h
@@ -60,6 +60,7 @@
60#define HAVE_WM8975 60#define HAVE_WM8975
61 61
62#define AB_REPEAT_ENABLE 1 62#define AB_REPEAT_ENABLE 1
63#define ACTION_WPSAB_SINGLE ACTION_WPS_BROWSE
63 64
64/* Define this for LCD backlight available */ 65/* Define this for LCD backlight available */
65#define CONFIG_BACKLIGHT BL_IPODNANO /* port controlled */ 66#define CONFIG_BACKLIGHT BL_IPODNANO /* port controlled */
diff --git a/firmware/export/config-ipodvideo.h b/firmware/export/config-ipodvideo.h
index fa78c5c7ee..1ed7f93a69 100644
--- a/firmware/export/config-ipodvideo.h
+++ b/firmware/export/config-ipodvideo.h
@@ -60,6 +60,7 @@
60#define HAVE_WM8758 60#define HAVE_WM8758
61 61
62#define AB_REPEAT_ENABLE 1 62#define AB_REPEAT_ENABLE 1
63#define ACTION_WPSAB_SINGLE ACTION_WPS_BROWSE
63 64
64/* Define this for LCD backlight available */ 65/* Define this for LCD backlight available */
65#define CONFIG_BACKLIGHT BL_IPODNANO /* port controlled */ 66#define CONFIG_BACKLIGHT BL_IPODNANO /* port controlled */