diff options
Diffstat (limited to 'apps/gui')
-rw-r--r-- | apps/gui/gwps-common.c | 5 | ||||
-rw-r--r-- | apps/gui/gwps.c | 55 | ||||
-rw-r--r-- | apps/gui/gwps.h | 6 | ||||
-rw-r--r-- | apps/gui/quickscreen.c | 1 | ||||
-rw-r--r-- | apps/gui/statusbar.c | 4 | ||||
-rw-r--r-- | apps/gui/yesno.c | 1 |
6 files changed, 60 insertions, 12 deletions
diff --git a/apps/gui/gwps-common.c b/apps/gui/gwps-common.c index b9b3e9bcd0..31b4de239f 100644 --- a/apps/gui/gwps-common.c +++ b/apps/gui/gwps-common.c | |||
@@ -31,6 +31,7 @@ | |||
31 | #ifdef HAVE_LCD_CHARCELLS | 31 | #ifdef HAVE_LCD_CHARCELLS |
32 | #include "hwcompat.h" | 32 | #include "hwcompat.h" |
33 | #endif | 33 | #endif |
34 | #include "abrepeat.h" | ||
34 | #include "mp3_playback.h" | 35 | #include "mp3_playback.h" |
35 | #include "backlight.h" | 36 | #include "backlight.h" |
36 | #include "lang.h" | 37 | #include "lang.h" |
@@ -1431,8 +1432,8 @@ bool gui_wps_refresh(struct gui_wps *gwps, int ffwd_offset, | |||
1431 | HORIZONTAL); | 1432 | HORIZONTAL); |
1432 | #ifdef AB_REPEAT_ENABLE | 1433 | #ifdef AB_REPEAT_ENABLE |
1433 | if ( ab_repeat_mode_enabled() ) | 1434 | if ( ab_repeat_mode_enabled() ) |
1434 | ab_draw_markers(state->id3->length, 0, sby, LCD_WIDTH, | 1435 | ab_draw_markers(display, state->id3->length, 0, sby, |
1435 | PROGRESS_BAR_HEIGHT); | 1436 | PROGRESS_BAR_HEIGHT); |
1436 | #endif | 1437 | #endif |
1437 | update_line = true; | 1438 | update_line = true; |
1438 | } | 1439 | } |
diff --git a/apps/gui/gwps.c b/apps/gui/gwps.c index efe207f94a..f75dd80d0f 100644 --- a/apps/gui/gwps.c +++ b/apps/gui/gwps.c | |||
@@ -392,11 +392,17 @@ long gui_wps_show(void) | |||
392 | #ifdef AB_REPEAT_ENABLE | 392 | #ifdef AB_REPEAT_ENABLE |
393 | /* if we're in A/B repeat mode and the current position | 393 | /* if we're in A/B repeat mode and the current position |
394 | is past the A marker, jump back to the A marker... */ | 394 | is past the A marker, jump back to the A marker... */ |
395 | if ( ab_repeat_mode_enabled() | 395 | if ( ab_repeat_mode_enabled() ) |
396 | && ab_after_A_marker(wps_state.id3->elapsed) ) | ||
397 | { | 396 | { |
398 | ab_jump_to_A_marker(); | 397 | if ( ab_after_A_marker(wps_state.id3->elapsed) ) |
399 | break; | 398 | { |
399 | ab_jump_to_A_marker(); | ||
400 | break; | ||
401 | #if (AB_REPEAT_ENABLE == 2) | ||
402 | } else { | ||
403 | ab_reset_markers(); | ||
404 | #endif | ||
405 | } | ||
400 | } | 406 | } |
401 | /* ...otherwise, do it normally */ | 407 | /* ...otherwise, do it normally */ |
402 | #endif | 408 | #endif |
@@ -451,11 +457,17 @@ long gui_wps_show(void) | |||
451 | #ifdef AB_REPEAT_ENABLE | 457 | #ifdef AB_REPEAT_ENABLE |
452 | /* if we're in A/B repeat mode and the current position is | 458 | /* if we're in A/B repeat mode and the current position is |
453 | before the A marker, jump to the A marker... */ | 459 | before the A marker, jump to the A marker... */ |
454 | if ( ab_repeat_mode_enabled() | 460 | if ( ab_repeat_mode_enabled() ) |
455 | && ab_before_A_marker(wps_state.id3->elapsed) ) | ||
456 | { | 461 | { |
457 | ab_jump_to_A_marker(); | 462 | if ( ab_before_A_marker(wps_state.id3->elapsed) ) |
458 | break; | 463 | { |
464 | ab_jump_to_A_marker(); | ||
465 | break; | ||
466 | #if (AB_REPEAT_ENABLE == 2) | ||
467 | } else { | ||
468 | ab_reset_markers(); | ||
469 | #endif | ||
470 | } | ||
459 | } | 471 | } |
460 | /* ...otherwise, do it normally */ | 472 | /* ...otherwise, do it normally */ |
461 | #endif | 473 | #endif |
@@ -545,6 +557,33 @@ long gui_wps_show(void) | |||
545 | 557 | ||
546 | #ifdef AB_REPEAT_ENABLE | 558 | #ifdef AB_REPEAT_ENABLE |
547 | 559 | ||
560 | #ifdef WPS_AB_SINGLE | ||
561 | case WPS_AB_SINGLE: | ||
562 | #ifdef WPS_AB_SINGLE_PRE | ||
563 | if (lastbutton != WPS_AB_SINGLE_PRE) | ||
564 | break; | ||
565 | #endif | ||
566 | /* If we are using the menu option to enable ab_repeat mode, don't do anything | ||
567 | * when it's disabled */ | ||
568 | #if (AB_REPEAT_ENABLE == 1) | ||
569 | if (!ab_repeat_mode_enabled()) | ||
570 | break; | ||
571 | #endif | ||
572 | if (ab_A_marker_set()) { | ||
573 | update_track = true; | ||
574 | if (ab_B_marker_set()) { | ||
575 | ab_reset_markers(); | ||
576 | break; | ||
577 | } | ||
578 | ab_set_B_marker(wps_state.id3->elapsed); | ||
579 | ab_jump_to_A_marker(); | ||
580 | break; | ||
581 | } | ||
582 | ab_set_A_marker(wps_state.id3->elapsed); | ||
583 | break; | ||
584 | #endif | ||
585 | |||
586 | |||
548 | #ifdef WPS_AB_SET_A_MARKER | 587 | #ifdef WPS_AB_SET_A_MARKER |
549 | /* set A marker for A-B repeat */ | 588 | /* set A marker for A-B repeat */ |
550 | case WPS_AB_SET_A_MARKER: | 589 | case WPS_AB_SET_A_MARKER: |
diff --git a/apps/gui/gwps.h b/apps/gui/gwps.h index 1017181a21..e00f6288ef 100644 --- a/apps/gui/gwps.h +++ b/apps/gui/gwps.h | |||
@@ -68,6 +68,12 @@ | |||
68 | #define WPS_RC_CONTEXT (BUTTON_RC_MENU | BUTTON_REPEAT) | 68 | #define WPS_RC_CONTEXT (BUTTON_RC_MENU | BUTTON_REPEAT) |
69 | #define WPS_RC_QUICK (BUTTON_RC_MODE | BUTTON_REPEAT) | 69 | #define WPS_RC_QUICK (BUTTON_RC_MODE | BUTTON_REPEAT) |
70 | 70 | ||
71 | #ifdef AB_REPEAT_ENABLE | ||
72 | #define WPS_AB_SET_A_MARKER (BUTTON_ON | BUTTON_LEFT) | ||
73 | #define WPS_AB_SET_B_MARKER (BUTTON_ON | BUTTON_RIGHT) | ||
74 | #define WPS_AB_RESET_AB_MARKERS (BUTTON_ON | BUTTON_OFF) | ||
75 | #endif | ||
76 | |||
71 | #elif CONFIG_KEYPAD == RECORDER_PAD | 77 | #elif CONFIG_KEYPAD == RECORDER_PAD |
72 | #define WPS_NEXT (BUTTON_RIGHT | BUTTON_REL) | 78 | #define WPS_NEXT (BUTTON_RIGHT | BUTTON_REL) |
73 | #define WPS_NEXT_PRE BUTTON_RIGHT | 79 | #define WPS_NEXT_PRE BUTTON_RIGHT |
diff --git a/apps/gui/quickscreen.c b/apps/gui/quickscreen.c index 07d4e2eee6..6aac24f81e 100644 --- a/apps/gui/quickscreen.c +++ b/apps/gui/quickscreen.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include "quickscreen.h" | 20 | #include "quickscreen.h" |
21 | #ifdef HAS_QUICKSCREEN | 21 | #ifdef HAS_QUICKSCREEN |
22 | 22 | ||
23 | #include "system.h" | ||
23 | #include "icons.h" | 24 | #include "icons.h" |
24 | #include "textarea.h" | 25 | #include "textarea.h" |
25 | #include "font.h" | 26 | #include "font.h" |
diff --git a/apps/gui/statusbar.c b/apps/gui/statusbar.c index d8e611af85..34ac5283af 100644 --- a/apps/gui/statusbar.c +++ b/apps/gui/statusbar.c | |||
@@ -247,11 +247,11 @@ void gui_statusbar_draw(struct gui_statusbar * bar, bool force_redraw) | |||
247 | Icon_Play); | 247 | Icon_Play); |
248 | 248 | ||
249 | switch (bar->info.repeat) { | 249 | switch (bar->info.repeat) { |
250 | #ifdef AB_REPEAT_ENABLE | 250 | #if (AB_REPEAT_ENABLE == 1) |
251 | case REPEAT_AB: | 251 | case REPEAT_AB: |
252 | gui_statusbar_icon_play_mode(display, Icon_RepeatAB); | 252 | gui_statusbar_icon_play_mode(display, Icon_RepeatAB); |
253 | break; | 253 | break; |
254 | #endif /* AB_REPEAT_ENABLE */ | 254 | #endif /* AB_REPEAT_ENABLE == 1 */ |
255 | 255 | ||
256 | case REPEAT_ONE: | 256 | case REPEAT_ONE: |
257 | gui_statusbar_icon_play_mode(display, Icon_RepeatOne); | 257 | gui_statusbar_icon_play_mode(display, Icon_RepeatOne); |
diff --git a/apps/gui/yesno.c b/apps/gui/yesno.c index 3345a691ca..225f6d3f43 100644 --- a/apps/gui/yesno.c +++ b/apps/gui/yesno.c | |||
@@ -1,4 +1,5 @@ | |||
1 | #include "yesno.h" | 1 | #include "yesno.h" |
2 | #include "system.h" | ||
2 | #include "kernel.h" | 3 | #include "kernel.h" |
3 | #include "misc.h" | 4 | #include "misc.h" |
4 | #include "lang.h" | 5 | #include "lang.h" |