From 224c0a13ebb5828b9bc06a9c1c23ae17f0ac19f9 Mon Sep 17 00:00:00 2001 From: Linus Nielsen Feltzing Date: Tue, 15 Aug 2006 12:27:07 +0000 Subject: Finally, the new button action system is here, thanks to Jonathan Gordon. Some button mappings have changed and other things may break. Comments should go to the forum, http://forums.rockbox.org/index.php?topic=5829.0 or the mailing list. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10582 a1c6a512-1295-4272-9138-f99709370657 --- apps/gui/gwps-common.c | 37 ++++++++++++------------------------- 1 file changed, 12 insertions(+), 25 deletions(-) (limited to 'apps/gui/gwps-common.c') diff --git a/apps/gui/gwps-common.c b/apps/gui/gwps-common.c index d83ac55787..72ad4d6e93 100644 --- a/apps/gui/gwps-common.c +++ b/apps/gui/gwps-common.c @@ -52,6 +52,7 @@ #include "backdrop.h" #endif #include "dsp.h" +#include "action.h" #ifdef HAVE_LCD_CHARCELLS static bool draw_player_progress(struct gui_wps *gwps); @@ -2319,19 +2320,18 @@ bool ffwd_rew(int button) bool usb = false; int i = 0; + if (button == ACTION_NONE) + { + status_set_ffmode(0); + return usb; + } while (!exit) { switch ( button ) { - case WPS_FFWD: -#ifdef WPS_RC_FFWD - case WPS_RC_FFWD: -#endif + case ACTION_WPS_SEEKFWD: direction = 1; - case WPS_REW: -#ifdef WPS_RC_REW - case WPS_RC_REW: -#endif + case ACTION_WPS_SEEKBACK: if (wps_state.ff_rewind) { if (direction == 1) @@ -2415,12 +2415,7 @@ bool ffwd_rew(int button) break; - case WPS_PREV: - case WPS_NEXT: -#ifdef WPS_RC_PREV - case WPS_RC_PREV: - case WPS_RC_NEXT: -#endif + case ACTION_WPS_STOPSEEK: wps_state.id3->elapsed = wps_state.id3->elapsed+ff_rewind_count; audio_ff_rewind(wps_state.id3->elapsed); ff_rewind_count = 0; @@ -2445,9 +2440,9 @@ bool ffwd_rew(int button) break; } if (!exit) - button = button_get(true); + button = get_action(CONTEXT_WPS,TIMEOUT_BLOCK); } - + action_signalscreenchange(); return usb; } @@ -2547,7 +2542,7 @@ bool update(struct gui_wps *gwps) return retcode; } -#ifdef WPS_KEYLOCK + void display_keylock_text(bool locked) { char* s; @@ -2569,11 +2564,3 @@ void display_keylock_text(bool locked) gui_syncsplash(HZ, true, s); } -void waitfor_nokey(void) -{ - /* wait until all keys are released */ - while (button_get(false) != BUTTON_NONE) - yield(); -} -#endif - -- cgit v1.2.3