From 4855006aabd7243ff30903b126560f7790dd74dd Mon Sep 17 00:00:00 2001 From: Karl Kurbjun Date: Tue, 21 Apr 2009 04:24:16 +0000 Subject: Add initial plugin keymaps for M:robe 500 git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20765 a1c6a512-1295-4272-9138-f99709370657 --- apps/plugins/SOURCES | 2 -- apps/plugins/blackjack.c | 9 +++++++++ apps/plugins/bounce.c | 3 +++ apps/plugins/brickmania.c | 3 +++ apps/plugins/calculator.c | 3 +++ apps/plugins/calendar.c | 30 ++++++++++++++++++++++++++++++ apps/plugins/chip8.c | 2 +- apps/plugins/chopper.c | 2 +- apps/plugins/fireworks.c | 2 ++ apps/plugins/flipit.c | 2 +- apps/plugins/invadrox.c | 2 +- apps/plugins/jewels.c | 4 ++-- apps/plugins/mandelbrot.c | 2 +- apps/plugins/matrix.c | 2 +- apps/plugins/minesweeper.c | 2 +- apps/plugins/mp3_encoder.c | 2 +- apps/plugins/oscilloscope.c | 3 +++ apps/plugins/pegbox.c | 2 +- apps/plugins/pong.c | 2 +- apps/plugins/rockblox1d.c | 5 +++++ apps/plugins/rockpaint.c | 3 +++ apps/plugins/sliding_puzzle.c | 2 +- apps/plugins/snake.c | 2 +- apps/plugins/snake2.c | 2 +- apps/plugins/sokoban.c | 5 +++++ apps/plugins/solitaire.c | 2 +- apps/plugins/spacerocks.c | 8 +++++++- apps/plugins/star.c | 4 ++++ apps/plugins/vu_meter.c | 4 ++++ apps/plugins/wormlet.c | 2 +- apps/plugins/xobox.c | 2 +- 31 files changed, 99 insertions(+), 21 deletions(-) (limited to 'apps/plugins') diff --git a/apps/plugins/SOURCES b/apps/plugins/SOURCES index d9ed9ac24f..e8d76441b5 100644 --- a/apps/plugins/SOURCES +++ b/apps/plugins/SOURCES @@ -29,7 +29,6 @@ firmware_flash.c rockbox_flash.c #endif /* CONFIG_CPU */ -#ifndef OLYMPUS_MROBE_500 #if (CONFIG_CODEC == SWCODEC) || !defined(SIMULATOR) metronome.c @@ -161,6 +160,5 @@ iriver_flash.c invadrox.c superdom.c #endif -#endif /* m:robe 500 */ md5sum.c diff --git a/apps/plugins/blackjack.c b/apps/plugins/blackjack.c index 1424a0130e..71d8f76b2c 100644 --- a/apps/plugins/blackjack.c +++ b/apps/plugins/blackjack.c @@ -338,11 +338,20 @@ PLUGIN_HEADER #define BJACK_DOUBLEDOWN BUTTON_VOL_DOWN #define BJACK_SCORES BUTTON_MENU +#elif CONFIG_KEYPAD == MROBE500_PAD +#define BJACK_QUIT BUTTON_POWER + #else #error No keymap defined! #endif #ifdef HAVE_TOUCHSCREEN +#ifndef BJACK_DOUBLEDOWN +#define BJACK_DOUBLEDOWN BUTTON_MIDLEFT +#endif +#ifndef BJACK_SCORES +#define BJACK_SCORES BUTTON_MIDRIGHT +#endif #ifndef BJACK_START #define BJACK_START BUTTON_CENTER #endif diff --git a/apps/plugins/bounce.c b/apps/plugins/bounce.c index e7a214dcbb..ee4c3e443c 100644 --- a/apps/plugins/bounce.c +++ b/apps/plugins/bounce.c @@ -174,6 +174,9 @@ PLUGIN_HEADER #define BOUNCE_QUIT BUTTON_POWER #define BOUNCE_MODE BUTTON_MENU +#elif CONFIG_KEYPAD == MROBE500_PAD +#define BOUNCE_QUIT BUTTON_POWER + #else #error No keymap defined! #endif diff --git a/apps/plugins/brickmania.c b/apps/plugins/brickmania.c index 96098a1f31..2f11cef24e 100644 --- a/apps/plugins/brickmania.c +++ b/apps/plugins/brickmania.c @@ -208,6 +208,9 @@ CONFIG_KEYPAD == SANSA_M200_PAD #define RIGHT BUTTON_VOL_UP #define SELECT BUTTON_MENU +#elif CONFIG_KEYPAD == MROBE500_PAD +#define QUIT BUTTON_POWER + #else #error No keymap defined! #endif diff --git a/apps/plugins/calculator.c b/apps/plugins/calculator.c index 6414de645c..4af747016d 100644 --- a/apps/plugins/calculator.c +++ b/apps/plugins/calculator.c @@ -342,6 +342,9 @@ PLUGIN_HEADER #define CALCULATOR_QUIT BUTTON_POWER #define CALCULATOR_CLEAR BUTTON_MENU +#elif CONFIG_KEYPAD == MROBE500_PAD +#define CALCULATOR_QUIT BUTTON_POWER + #else #error No keymap defined! #endif diff --git a/apps/plugins/calendar.c b/apps/plugins/calendar.c index 5bcb6afc4b..72b572e7eb 100644 --- a/apps/plugins/calendar.c +++ b/apps/plugins/calendar.c @@ -192,10 +192,40 @@ CONFIG_KEYPAD == SANSA_M200_PAD #define CALENDAR_NEXT_MONTH BUTTON_BOTTOMRIGHT #define CALENDAR_PREV_MONTH BUTTON_BOTTOMLEFT +#elif CONFIG_KEYPAD == MROBE500_PAD +#define CALENDAR_QUIT BUTTON_POWER + #else #error "No keypad setting." #endif +#ifdef HAVE_TOUCHSCREEN +#ifndef CALENDAR_QUIT +#define CALENDAR_QUIT BUTTON_MIDLEFT +#endif +#ifndef CALENDAR_SELECT +#define CALENDAR_SELECT BUTTON_CENTER +#endif +#ifndef CALENDAR_NEXT_DAY +#define CALENDAR_NEXT_DAY BUTTON_TOPLEFT +#endif +#ifndef CALENDAR_PREV_DAY +#define CALENDAR_PREV_DAY BUTTON_BOTTOMLEFT +#endif +#ifndef CALENDAR_NEXT_WEEK +#define CALENDAR_NEXT_WEEK BUTTON_TOPMIDDLE +#endif +#ifndef CALENDAR_PREV_WEEK +#define CALENDAR_PREV_WEEK BUTTON_BOTTOMMIDDLE +#endif +#ifndef CALENDAR_NEXT_MONTH +#define CALENDAR_NEXT_MONTH BUTTON_TOPRIGHT +#endif +#ifndef CALENDAR_PREV_MONTH +#define CALENDAR_PREV_MONTH BUTTON_BOTTOMRIGHT +#endif +#endif + #define X_OFFSET ((LCD_WIDTH%7)/2) #if LCD_HEIGHT <= 80 #define Y_OFFSET 1 diff --git a/apps/plugins/chip8.c b/apps/plugins/chip8.c index 78ea4e13fd..0fc2c61e65 100644 --- a/apps/plugins/chip8.c +++ b/apps/plugins/chip8.c @@ -1102,7 +1102,7 @@ CONFIG_KEYPAD == SANSA_M200_PAD #define CHIP8_KEY8 BUTTON_DOWN #define CHIP8_KEY9 BUTTON_VIEW -#elif (CONFIG_KEYPAD == ONDAVX747_PAD) +#elif (CONFIG_KEYPAD == ONDAVX747_PAD) || CONFIG_KEYPAD == MROBE500_PAD #define CHIP8_OFF BUTTON_POWER #else diff --git a/apps/plugins/chopper.c b/apps/plugins/chopper.c index 9997d204d8..2c1ee477eb 100644 --- a/apps/plugins/chopper.c +++ b/apps/plugins/chopper.c @@ -134,7 +134,7 @@ Still To do: #define ACTION2 BUTTON_SELECT #define ACTIONTEXT "MENU" -#elif CONFIG_KEYPAD == ONDAVX747_PAD +#elif CONFIG_KEYPAD == ONDAVX747_PAD || CONFIG_KEYPAD == MROBE500_PAD #define QUIT BUTTON_POWER #else diff --git a/apps/plugins/fireworks.c b/apps/plugins/fireworks.c index 726b3eb381..168a67baa9 100644 --- a/apps/plugins/fireworks.c +++ b/apps/plugins/fireworks.c @@ -103,6 +103,8 @@ PLUGIN_HEADER #elif (CONFIG_KEYPAD == ONDAVX747_PAD) #define BTN_MENU (BUTTON_MENU|BUTTON_REL) +#elif defined(HAVE_TOUCHSCREEN) + /* This is a touchscreen target */ #else #error No keymap defined! #endif diff --git a/apps/plugins/flipit.c b/apps/plugins/flipit.c index 3c7d543882..fe383c1394 100644 --- a/apps/plugins/flipit.c +++ b/apps/plugins/flipit.c @@ -276,7 +276,7 @@ PLUGIN_HEADER #define FLIPIT_STEP_BY_STEP BUTTON_PLAYLIST #define FLIPIT_TOGGLE BUTTON_SELECT -#elif CONFIG_KEYPAD == ONDAVX747_PAD +#elif CONFIG_KEYPAD == ONDAVX747_PAD || CONFIG_KEYPAD == MROBE500_PAD #define FLIPIT_QUIT BUTTON_POWER diff --git a/apps/plugins/invadrox.c b/apps/plugins/invadrox.c index 6c3d52206e..c7d5696d19 100644 --- a/apps/plugins/invadrox.c +++ b/apps/plugins/invadrox.c @@ -140,7 +140,7 @@ PLUGIN_HEADER #define RIGHT BUTTON_RIGHT #define FIRE BUTTON_SELECT -#elif CONFIG_KEYPAD == ONDAVX747_PAD +#elif CONFIG_KEYPAD == ONDAVX747_PAD || CONFIG_KEYPAD == MROBE500_PAD #define QUIT BUTTON_POWER diff --git a/apps/plugins/jewels.c b/apps/plugins/jewels.c index 922f32dd8b..6bf5fcf8ac 100644 --- a/apps/plugins/jewels.c +++ b/apps/plugins/jewels.c @@ -192,7 +192,7 @@ CONFIG_KEYPAD == SANSA_M200_PAD #define JEWELS_SELECT BUTTON_SELECT #define JEWELS_CANCEL BUTTON_POWER -#elif CONFIG_KEYPAD == ONDAVX747_PAD +#elif CONFIG_KEYPAD == ONDAVX747_PAD || CONFIG_KEYPAD == MROBE500_PAD #define JEWELS_CANCEL BUTTON_POWER #else @@ -1672,7 +1672,7 @@ static int jewels_main(struct game_context* bj) { rb->lcd_puts(0, 9, "SELECT/PLAY to select"); rb->lcd_puts(0, 10, "Long SELECT to show menu"); rb->lcd_puts(0, 11, "POWER to cancel"); -#elif CONFIG_KEYPAD == ONDAVX747_PAD +#elif CONFIG_KEYPAD == ONDAVX747_PAD || CONFIG_KEYPAD == MROBE500_PAD rb->lcd_puts(0, 11, "POWER to cancel"); #else #warning: missing help text. diff --git a/apps/plugins/mandelbrot.c b/apps/plugins/mandelbrot.c index 82d694e293..61469d7597 100644 --- a/apps/plugins/mandelbrot.c +++ b/apps/plugins/mandelbrot.c @@ -283,7 +283,7 @@ PLUGIN_HEADER #define MANDELBROT_MAXITER_DEC BUTTON_VOL_DOWN #define MANDELBROT_RESET BUTTON_MENU -#elif CONFIG_KEYPAD == ONDAVX747_PAD +#elif CONFIG_KEYPAD == ONDAVX747_PAD || CONFIG_KEYPAD == MROBE500_PAD #define MANDELBROT_QUIT BUTTON_POWER #else diff --git a/apps/plugins/matrix.c b/apps/plugins/matrix.c index 060dd2efe6..154a2e5378 100644 --- a/apps/plugins/matrix.c +++ b/apps/plugins/matrix.c @@ -133,7 +133,7 @@ extern const fb_data matrix_normal[]; #define MATRIX_SLEEP_LESS BUTTON_DOWN #define MATRIX_PAUSE BUTTON_SELECT -#elif (CONFIG_KEYPAD == ONDAVX747_PAD) +#elif (CONFIG_KEYPAD == ONDAVX747_PAD) || CONFIG_KEYPAD == MROBE500_PAD #define MATRIX_EXIT BUTTON_POWER #else diff --git a/apps/plugins/minesweeper.c b/apps/plugins/minesweeper.c index e4eaacbbdc..a21efeec76 100644 --- a/apps/plugins/minesweeper.c +++ b/apps/plugins/minesweeper.c @@ -224,7 +224,7 @@ enum minesweeper_status { # define MINESWP_DISCOVER BUTTON_SELECT # define MINESWP_INFO BUTTON_MENU -#elif (CONFIG_KEYPAD == ONDAVX747_PAD) +#elif (CONFIG_KEYPAD == ONDAVX747_PAD) || CONFIG_KEYPAD == MROBE500_PAD # define MINESWP_QUIT BUTTON_POWER #else diff --git a/apps/plugins/mp3_encoder.c b/apps/plugins/mp3_encoder.c index eab53a2a55..6849daf2f3 100644 --- a/apps/plugins/mp3_encoder.c +++ b/apps/plugins/mp3_encoder.c @@ -2489,7 +2489,7 @@ void get_mp3_filename(const char *wav_name) #define MP3ENC_DONE BUTTON_POWER #define MP3ENC_SELECT BUTTON_SELECT -#elif CONFIG_KEYPAD == ONDAVX747_PAD +#elif CONFIG_KEYPAD == ONDAVX747_PAD || CONFIG_KEYPAD == MROBE500_PAD #define MP3ENC_DONE BUTTON_POWER #else diff --git a/apps/plugins/oscilloscope.c b/apps/plugins/oscilloscope.c index 6e69c3ccf0..1e9e873ae7 100644 --- a/apps/plugins/oscilloscope.c +++ b/apps/plugins/oscilloscope.c @@ -248,6 +248,9 @@ PLUGIN_HEADER #define OSCILLOSCOPE_VOL_UP BUTTON_VOL_UP #define OSCILLOSCOPE_VOL_DOWN BUTTON_VOL_DOWN +#elif CONFIG_KEYPAD == MROBE500_PAD +#define OSCILLOSCOPE_QUIT BUTTON_POWER + #else #error No keymap defined! #endif diff --git a/apps/plugins/pegbox.c b/apps/plugins/pegbox.c index c705f8cd46..75a37e18a8 100644 --- a/apps/plugins/pegbox.c +++ b/apps/plugins/pegbox.c @@ -368,7 +368,7 @@ PLUGIN_HEADER #define LVL_UP_TEXT "VOL+" #define LVL_DOWN_TEXT "VOL-" -#elif CONFIG_KEYPAD == ONDAVX747_PAD +#elif CONFIG_KEYPAD == ONDAVX747_PAD || CONFIG_KEYPAD == MROBE500_PAD #define PEGBOX_QUIT BUTTON_POWER #define QUIT_TEXT "POWER" diff --git a/apps/plugins/pong.c b/apps/plugins/pong.c index e2b4befe82..0411b55c07 100644 --- a/apps/plugins/pong.c +++ b/apps/plugins/pong.c @@ -184,7 +184,7 @@ PLUGIN_HEADER #define PONG_RIGHT_UP BUTTON_VOL_UP #define PONG_RIGHT_DOWN BUTTON_VOL_DOWN -#elif (CONFIG_KEYPAD == ONDAVX747_PAD) +#elif (CONFIG_KEYPAD == ONDAVX747_PAD) || CONFIG_KEYPAD == MROBE500_PAD #define PONG_QUIT BUTTON_POWER #else diff --git a/apps/plugins/rockblox1d.c b/apps/plugins/rockblox1d.c index 6b745fbb73..2774b2ca12 100644 --- a/apps/plugins/rockblox1d.c +++ b/apps/plugins/rockblox1d.c @@ -105,6 +105,11 @@ PLUGIN_HEADER #define ONEDROCKBLOX_DOWN BUTTON_MENU #define ONEDROCKBLOX_QUIT BUTTON_POWER +#elif defined(HAVE_TOUCHSCREEN) + +#define ONEDROCKBLOX_DOWN BUTTON_BOTTOMMIDDLE +#define ONEDROCKBLOX_QUIT BUTTON_POWER + #else #error No keymap defined! #endif diff --git a/apps/plugins/rockpaint.c b/apps/plugins/rockpaint.c index 4db36a085c..f92c616e07 100644 --- a/apps/plugins/rockpaint.c +++ b/apps/plugins/rockpaint.c @@ -158,6 +158,9 @@ PLUGIN_HEADER #define ROCKPAINT_QUIT BUTTON_POWER #define ROCKPAINT_MENU BUTTON_MENU +#elif CONFIG_KEYPAD == MROBE500_PAD +#define ROCKPAINT_QUIT BUTTON_POWER + #else #error "Please define keys for this keypad" #endif diff --git a/apps/plugins/sliding_puzzle.c b/apps/plugins/sliding_puzzle.c index 994b8fc15b..7df303df2d 100644 --- a/apps/plugins/sliding_puzzle.c +++ b/apps/plugins/sliding_puzzle.c @@ -188,7 +188,7 @@ PLUGIN_HEADER #define PUZZLE_SHUFFLE BUTTON_VIEW #define PUZZLE_PICTURE BUTTON_MENU -#elif (CONFIG_KEYPAD == ONDAVX747_PAD) +#elif (CONFIG_KEYPAD == ONDAVX747_PAD) || CONFIG_KEYPAD == MROBE500_PAD #define PUZZLE_QUIT BUTTON_POWER #define PUZZLE_QUIT_TEXT "[POWER]" diff --git a/apps/plugins/snake.c b/apps/plugins/snake.c index 5def0df1f4..8883cfc23c 100644 --- a/apps/plugins/snake.c +++ b/apps/plugins/snake.c @@ -171,7 +171,7 @@ PLUGIN_HEADER #define SNAKE_DOWN BUTTON_DOWN #define SNAKE_PLAYPAUSE BUTTON_MENU -#elif (CONFIG_KEYPAD == ONDAVX747_PAD) +#elif (CONFIG_KEYPAD == ONDAVX747_PAD) || CONFIG_KEYPAD == MROBE500_PAD #define SNAKE_QUIT BUTTON_POWER #else diff --git a/apps/plugins/snake2.c b/apps/plugins/snake2.c index eb2746ab7f..67678f5e03 100644 --- a/apps/plugins/snake2.c +++ b/apps/plugins/snake2.c @@ -350,7 +350,7 @@ PLUGIN_HEADER #define SNAKE2_PLAYPAUSE BUTTON_VIEW #define SNAKE2_PLAYPAUSE_TEXT "View" -#elif (CONFIG_KEYPAD == ONDAVX747_PAD) +#elif (CONFIG_KEYPAD == ONDAVX747_PAD) || CONFIG_KEYPAD == MROBE500_PAD #define SNAKE2_QUIT BUTTON_POWER #else diff --git a/apps/plugins/sokoban.c b/apps/plugins/sokoban.c index d027794127..8672249bdc 100644 --- a/apps/plugins/sokoban.c +++ b/apps/plugins/sokoban.c @@ -380,6 +380,11 @@ PLUGIN_HEADER #define SOKOBAN_MENU BUTTON_MENU #define SOKOBAN_MENU_NAME "[MENU]" +#elif CONFIG_KEYPAD == MROBE500_PAD + +#define SOKOBAN_MENU BUTTON_POWER +#define SOKOBAN_MENU_NAME "[POWER]" + #else #error No keymap defined! #endif diff --git a/apps/plugins/solitaire.c b/apps/plugins/solitaire.c index 619051fb92..f9c2a63b52 100644 --- a/apps/plugins/solitaire.c +++ b/apps/plugins/solitaire.c @@ -398,7 +398,7 @@ PLUGIN_HEADER # define HK_CUR2STACK "SELECT.." # define HK_REM2STACK "VIEW+RIGHT" -#elif (CONFIG_KEYPAD == ONDAVX747_PAD) +#elif (CONFIG_KEYPAD == ONDAVX747_PAD) || CONFIG_KEYPAD == MROBE500_PAD # define SOL_QUIT BUTTON_POWER #else diff --git a/apps/plugins/spacerocks.c b/apps/plugins/spacerocks.c index 6277c57524..d41abf9a3a 100644 --- a/apps/plugins/spacerocks.c +++ b/apps/plugins/spacerocks.c @@ -267,7 +267,7 @@ PLUGIN_HEADER #define AST_FIRE BUTTON_PLAYLIST #define AST_FIRE_REP (BUTTON_PLAYLIST | BUTTON_REPEAT) -#elif (CONFIG_KEYPAD == ONDAVX747_PAD) +#elif (CONFIG_KEYPAD == ONDAVX747_PAD) || CONFIG_KEYPAD == MROBE500_PAD #define AST_QUIT BUTTON_POWER #else @@ -306,7 +306,13 @@ PLUGIN_HEADER #define AST_FIRE BUTTON_BOTTOMMIDDLE #endif #ifndef AST_FIRE_REP + +#ifdef BUTTON_MENU #define AST_FIRE_REP (BUTTON_BOTTOMMIDDLE | BUTTON_MENU) +#else +#define AST_FIRE_REP BUTTON_BOTTOMMIDDLE | BUTTON_REPEAT +#endif + #endif #endif diff --git a/apps/plugins/star.c b/apps/plugins/star.c index d7524516f4..880bcdebe3 100644 --- a/apps/plugins/star.c +++ b/apps/plugins/star.c @@ -282,6 +282,10 @@ PLUGIN_HEADER #define STAR_QUIT_NAME "[POWER]" #define STAR_MENU_RUN BUTTON_MENU +#elif CONFIG_KEYPAD == MROBE500_PAD +#define STAR_QUIT BUTTON_POWER +#define STAR_QUIT_NAME "[POWER]" + #else #error No keymap defined! #endif diff --git a/apps/plugins/vu_meter.c b/apps/plugins/vu_meter.c index b5e9afa5bf..16aac3a011 100644 --- a/apps/plugins/vu_meter.c +++ b/apps/plugins/vu_meter.c @@ -279,6 +279,10 @@ PLUGIN_HEADER #define LABEL_QUIT "POWER" #define LABEL_MENU "MENU" +#elif CONFIG_KEYPAD == MROBE500_PAD +#define VUMETER_QUIT BUTTON_POWER +#define LABEL_QUIT "POWER" + #else #error No keymap defined! #endif diff --git a/apps/plugins/wormlet.c b/apps/plugins/wormlet.c index cc8bf07d91..4cc3d5cec1 100644 --- a/apps/plugins/wormlet.c +++ b/apps/plugins/wormlet.c @@ -286,7 +286,7 @@ PLUGIN_HEADER #define PLAYERS_TEXT "Up/Down" #define WORMS_TEXT "Left/Right" -#elif (CONFIG_KEYPAD == ONDAVX747_PAD) +#elif (CONFIG_KEYPAD == ONDAVX747_PAD) || CONFIG_KEYPAD == MROBE500_PAD #define BTN_QUIT BUTTON_POWER diff --git a/apps/plugins/xobox.c b/apps/plugins/xobox.c index 96a68b1447..f0b1553aa9 100644 --- a/apps/plugins/xobox.c +++ b/apps/plugins/xobox.c @@ -199,7 +199,7 @@ PLUGIN_HEADER #define DOWN BUTTON_DOWN #define PAUSE BUTTON_VIEW -#elif CONFIG_KEYPAD == ONDAVX747_PAD +#elif CONFIG_KEYPAD == ONDAVX747_PAD || CONFIG_KEYPAD == MROBE500_PAD #define QUIT BUTTON_POWER -- cgit v1.2.3