From e1f343afc782dd322d49dcdc09f53ed06be8c3e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C3=ABl=20Carr=C3=A9?= Date: Wed, 13 May 2009 08:27:36 +0000 Subject: [PATCH] Sansa Fuze : Fix r20680/FS#10075 (long HOME to exit plugins) Some plugins were forgotten : mpegplayer, test_fps, test_scanrate Some plugins use button_status() and can't use BUTTON_REL or BUTTON_REPEAT flags rockblox1d : use single press BUTTON_HOME doom : use single press BUTTON_HOME and BUTTON_POWER to open doors I may have forgotten some plugins, I didn't test them one by one git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20925 a1c6a512-1295-4272-9138-f99709370657 --- apps/plugins/doom/i_video.c | 8 ++++---- apps/plugins/mpegplayer/mpeg_settings.c | 13 +++++++++++-- apps/plugins/mpegplayer/mpegplayer.c | 13 +++++++++++-- apps/plugins/rockblox1d.c | 2 +- apps/plugins/test_fps.c | 2 ++ apps/plugins/test_scanrate.c | 10 ++++++++-- 6 files changed, 37 insertions(+), 11 deletions(-) diff --git a/apps/plugins/doom/i_video.c b/apps/plugins/doom/i_video.c index 2f0c9b42fd..759e2179aa 100644 --- a/apps/plugins/doom/i_video.c +++ b/apps/plugins/doom/i_video.c @@ -207,10 +207,10 @@ void I_ShutdownGraphics(void) #define DOOMBUTTON_DOWN BUTTON_DOWN #define DOOMBUTTON_LEFT BUTTON_LEFT #define DOOMBUTTON_RIGHT BUTTON_RIGHT -#define DOOMBUTTON_SHOOT (BUTTON_SELECT | BUTTON_REL) -#define DOOMBUTTON_OPEN (BUTTON_SELECT | BUTTON_HOME) -#define DOOMBUTTON_ESC (BUTTON_HOME|BUTTON_REPEAT) -#define DOOMBUTTON_ENTER (BUTTON_SELECT | BUTTON_REL) +#define DOOMBUTTON_SHOOT BUTTON_SELECT +#define DOOMBUTTON_OPEN BUTTON_POWER +#define DOOMBUTTON_ESC BUTTON_HOME +#define DOOMBUTTON_ENTER BUTTON_SELECT #define DOOMBUTTON_WEAPON DOOMBUTTON_SCROLLWHEEL_CW #elif CONFIG_KEYPAD == SANSA_C200_PAD #define DOOMBUTTON_UP BUTTON_UP diff --git a/apps/plugins/mpegplayer/mpeg_settings.c b/apps/plugins/mpegplayer/mpeg_settings.c index 189bdbcde7..8aea93b8f1 100644 --- a/apps/plugins/mpegplayer/mpeg_settings.c +++ b/apps/plugins/mpegplayer/mpeg_settings.c @@ -80,8 +80,7 @@ struct mpeg_settings settings; #define MPEG_START_TIME_DOWN BUTTON_SCROLL_DOWN #define MPEG_START_TIME_EXIT BUTTON_POWER -#elif (CONFIG_KEYPAD == SANSA_E200_PAD) \ - || (CONFIG_KEYPAD == SANSA_FUZE_PAD) +#elif (CONFIG_KEYPAD == SANSA_E200_PAD) #define MPEG_START_TIME_SELECT BUTTON_SELECT #define MPEG_START_TIME_SCROLL_UP BUTTON_SCROLL_BACK #define MPEG_START_TIME_SCROLL_DOWN BUTTON_SCROLL_FWD @@ -91,6 +90,16 @@ struct mpeg_settings settings; #define MPEG_START_TIME_DOWN BUTTON_DOWN #define MPEG_START_TIME_EXIT BUTTON_POWER +#elif (CONFIG_KEYPAD == SANSA_FUZE_PAD) +#define MPEG_START_TIME_SELECT BUTTON_SELECT +#define MPEG_START_TIME_SCROLL_UP BUTTON_SCROLL_BACK +#define MPEG_START_TIME_SCROLL_DOWN BUTTON_SCROLL_FWD +#define MPEG_START_TIME_LEFT BUTTON_LEFT +#define MPEG_START_TIME_RIGHT BUTTON_RIGHT +#define MPEG_START_TIME_UP BUTTON_UP +#define MPEG_START_TIME_DOWN BUTTON_DOWN +#define MPEG_START_TIME_EXIT (BUTTON_HOME|BUTTON_REPEAT) + #elif (CONFIG_KEYPAD == SANSA_C200_PAD) || \ (CONFIG_KEYPAD == SANSA_CLIP_PAD) || \ (CONFIG_KEYPAD == SANSA_M200_PAD) diff --git a/apps/plugins/mpegplayer/mpegplayer.c b/apps/plugins/mpegplayer/mpegplayer.c index 0ade023185..0a12a78ceb 100644 --- a/apps/plugins/mpegplayer/mpegplayer.c +++ b/apps/plugins/mpegplayer/mpegplayer.c @@ -187,8 +187,7 @@ PLUGIN_IRAM_DECLARE #define MPEG_RW BUTTON_REW #define MPEG_FF BUTTON_FF -#elif CONFIG_KEYPAD == SANSA_E200_PAD \ - || CONFIG_KEYPAD == SANSA_FUZE_PAD +#elif CONFIG_KEYPAD == SANSA_E200_PAD #define MPEG_MENU BUTTON_SELECT #define MPEG_STOP BUTTON_POWER #define MPEG_PAUSE BUTTON_UP @@ -197,6 +196,16 @@ PLUGIN_IRAM_DECLARE #define MPEG_RW BUTTON_LEFT #define MPEG_FF BUTTON_RIGHT +#elif CONFIG_KEYPAD == SANSA_FUZE_PAD +#define MPEG_MENU BUTTON_SELECT +#define MPEG_STOP (BUTTON_HOME|BUTTON_REPEAT) +#define MPEG_PAUSE BUTTON_UP +#define MPEG_VOLDOWN BUTTON_SCROLL_BACK +#define MPEG_VOLUP BUTTON_SCROLL_FWD +#define MPEG_RW BUTTON_LEFT +#define MPEG_FF BUTTON_RIGHT + + #elif CONFIG_KEYPAD == SANSA_C200_PAD || \ CONFIG_KEYPAD == SANSA_CLIP_PAD || \ CONFIG_KEYPAD == SANSA_M200_PAD diff --git a/apps/plugins/rockblox1d.c b/apps/plugins/rockblox1d.c index 2774b2ca12..2db83d6537 100644 --- a/apps/plugins/rockblox1d.c +++ b/apps/plugins/rockblox1d.c @@ -67,7 +67,7 @@ PLUGIN_HEADER #elif CONFIG_KEYPAD == SANSA_FUZE_PAD #define ONEDROCKBLOX_DOWN BUTTON_SELECT -#define ONEDROCKBLOX_QUIT (BUTTON_HOME|BUTTON_REPEAT) +#define ONEDROCKBLOX_QUIT BUTTON_HOME #elif (CONFIG_KEYPAD == IRIVER_H10_PAD) #define ONEDROCKBLOX_DOWN BUTTON_PLAY diff --git a/apps/plugins/test_fps.c b/apps/plugins/test_fps.c index c688a54de0..cba08f28d1 100644 --- a/apps/plugins/test_fps.c +++ b/apps/plugins/test_fps.c @@ -31,6 +31,8 @@ PLUGIN_IRAM_DECLARE #define FPS_QUIT BUTTON_MENU #elif CONFIG_KEYPAD == IAUDIO_M3_PAD #define FPS_QUIT BUTTON_RC_REC +#elif CONFIG_KEYPAD == SANSA_FUZE_PAD +#define FPS_QUIT (BUTTON_HOME|BUTTON_REPEAT) #elif defined(BUTTON_OFF) #define FPS_QUIT BUTTON_OFF #else diff --git a/apps/plugins/test_scanrate.c b/apps/plugins/test_scanrate.c index 2504bd36ac..7a0a13bc94 100644 --- a/apps/plugins/test_scanrate.c +++ b/apps/plugins/test_scanrate.c @@ -35,14 +35,20 @@ PLUGIN_HEADER #elif (CONFIG_KEYPAD == IAUDIO_X5M5_PAD) \ || (CONFIG_KEYPAD == MROBE100_PAD) \ - || (CONFIG_KEYPAD == SANSA_CLIP_PAD) \ - || (CONFIG_KEYPAD == SANSA_FUZE_PAD) + || (CONFIG_KEYPAD == SANSA_CLIP_PAD) #define SCANRATE_DONE BUTTON_POWER #define SCANRATE_FASTINC BUTTON_UP #define SCANRATE_FASTDEC BUTTON_DOWN #define SCANRATE_INC BUTTON_RIGHT #define SCANRATE_DEC BUTTON_LEFT +#elif CONFIG_KEYPAD == SANSA_FUZE_PAD +#define SCANRATE_DONE (BUTTON_HOME|BUTTON_REPEAT) +#define SCANRATE_FASTINC BUTTON_UP +#define SCANRATE_FASTDEC BUTTON_DOWN +#define SCANRATE_INC BUTTON_RIGHT +#define SCANRATE_DEC BUTTON_LEFT + #elif CONFIG_KEYPAD == IAUDIO_M3_PAD #define SCANRATE_DONE BUTTON_RC_REC #define SCANRATE_FASTINC BUTTON_RC_VOL_UP