summaryrefslogtreecommitdiffstats
path: root/apps/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins')
-rw-r--r--apps/plugins/battery_bench.c97
-rw-r--r--apps/plugins/blackjack.c50
-rw-r--r--apps/plugins/brickmania.c35
-rw-r--r--apps/plugins/calculator.c45
-rw-r--r--apps/plugins/calendar.c38
-rw-r--r--apps/plugins/chessbox/chessbox_pgn.h34
-rw-r--r--apps/plugins/chessclock.c41
-rw-r--r--apps/plugins/chip8.c50
-rw-r--r--apps/plugins/chopper.c31
-rw-r--r--apps/plugins/clix.c20
-rw-r--r--apps/plugins/cube.c40
-rw-r--r--apps/plugins/doom/i_video.c45
-rw-r--r--apps/plugins/fft/fft.c39
-rw-r--r--apps/plugins/flipit.c56
-rw-r--r--apps/plugins/fractals/fractal.h33
-rw-r--r--apps/plugins/goban/goban.h35
-rw-r--r--apps/plugins/imageviewer/imageviewer_button.h29
-rw-r--r--apps/plugins/invadrox.c63
-rw-r--r--apps/plugins/jewels.c71
-rw-r--r--apps/plugins/lib/keymaps.h26
-rw-r--r--apps/plugins/lib/pluginlib_actions.c27
-rw-r--r--apps/plugins/midi/midiplay.c37
-rw-r--r--apps/plugins/minesweeper.c31
-rw-r--r--apps/plugins/mp3_encoder.c80
-rw-r--r--apps/plugins/mpegplayer/mpeg_settings.c22
-rw-r--r--apps/plugins/mpegplayer/mpegplayer.c55
-rw-r--r--apps/plugins/oscilloscope.c71
-rw-r--r--apps/plugins/pacbox/pacbox.h25
-rw-r--r--apps/plugins/pegbox.c57
-rw-r--r--apps/plugins/pong.c25
-rw-r--r--apps/plugins/reversi/reversi-gui.h53
-rw-r--r--apps/plugins/rockblox.c42
-rw-r--r--apps/plugins/rockboy/rockboy.c30
-rw-r--r--apps/plugins/sliding_puzzle.c36
-rw-r--r--apps/plugins/snake.c20
-rw-r--r--apps/plugins/snake2.c21
-rw-r--r--apps/plugins/sokoban.c62
-rw-r--r--apps/plugins/solitaire.c53
-rw-r--r--apps/plugins/spacerocks.c36
-rw-r--r--apps/plugins/star.c62
-rw-r--r--apps/plugins/stopwatch.c62
-rw-r--r--apps/plugins/sudoku/sudoku.h37
-rw-r--r--apps/plugins/text_viewer/tv_button.h12
-rw-r--r--apps/plugins/vu_meter.c49
-rw-r--r--apps/plugins/wormlet.c21
-rw-r--r--apps/plugins/xobox.c40
-rw-r--r--apps/plugins/zxbox/keymaps.h20
-rw-r--r--apps/plugins/zxbox/zxbox_keyb.c29
48 files changed, 656 insertions, 1337 deletions
diff --git a/apps/plugins/battery_bench.c b/apps/plugins/battery_bench.c
index f68e3ed5a3..bb431e3e04 100644
--- a/apps/plugins/battery_bench.c
+++ b/apps/plugins/battery_bench.c
@@ -24,7 +24,6 @@
#include "plugin.h"
#include "lang_enum.h"
-
#define BATTERY_LOG HOME_DIR"/battery_bench.txt"
#define BUF_SIZE 16000
@@ -83,7 +82,17 @@
#define BATTERY_ON_TXT "SELECT - start"
#define BATTERY_OFF_TXT "HOME"
-#elif CONFIG_KEYPAD == IRIVER_H10_PAD
+#elif (CONFIG_KEYPAD == IRIVER_H10_PAD || \
+ CONFIG_KEYPAD == CREATIVE_ZENXFI3_PAD || \
+ CONFIG_KEYPAD == SONY_NWZ_PAD || \
+ CONFIG_KEYPAD == AGPTEK_ROCKER_PAD || \
+ CONFIG_KEYPAD == XDUOO_X3_PAD || \
+ CONFIG_KEYPAD == IHIFI_770_PAD || \
+ CONFIG_KEYPAD == IHIFI_800_PAD || \
+ CONFIG_KEYPAD == XDUOO_X3II_PAD || \
+ CONFIG_KEYPAD == XDUOO_X20_PAD || \
+ CONFIG_KEYPAD == FIIO_M3K_PAD || \
+ CONFIG_KEYPAD == EROSQ_PAD)
#define BATTERY_ON BUTTON_PLAY
#define BATTERY_OFF BUTTON_POWER
@@ -177,7 +186,7 @@
#elif (CONFIG_KEYPAD == SAMSUNG_YH820_PAD) || \
(CONFIG_KEYPAD == SAMSUNG_YH92X_PAD)
-
+
#define BATTERY_ON BUTTON_LEFT
#define BATTERY_OFF BUTTON_RIGHT
#define BATTERY_ON_TXT "LEFT"
@@ -214,12 +223,6 @@
#define BATTERY_ON_TXT "SELECT - start"
#define BATTERY_OFF_TXT "POWER"
-#elif CONFIG_KEYPAD == CREATIVE_ZENXFI3_PAD
-#define BATTERY_ON BUTTON_PLAY
-#define BATTERY_OFF BUTTON_POWER
-#define BATTERY_ON_TXT "PLAY - start"
-#define BATTERY_OFF_TXT "POWER"
-
#elif (CONFIG_KEYPAD == HM60X_PAD) || (CONFIG_KEYPAD == HM801_PAD)
#define BATTERY_ON BUTTON_SELECT
#define BATTERY_OFF BUTTON_POWER
@@ -227,12 +230,6 @@
#define BATTERY_OFF_TXT "POWER"
-#elif CONFIG_KEYPAD == SONY_NWZ_PAD
-#define BATTERY_ON BUTTON_PLAY
-#define BATTERY_OFF BUTTON_POWER
-#define BATTERY_ON_TXT "PLAY - start"
-#define BATTERY_OFF_TXT "Power"
-
#elif CONFIG_KEYPAD == DX50_PAD
#define BATTERY_ON BUTTON_PLAY
#define BATTERY_OFF BUTTON_POWER_LONG
@@ -245,53 +242,8 @@
#define BATTERY_OFF_TXT "Power"
#define BATTERY_ON_TXT "Menu - start"
-#elif CONFIG_KEYPAD == AGPTEK_ROCKER_PAD
-#define BATTERY_ON BUTTON_LEFT
-#define BATTERY_OFF BUTTON_RIGHT
-#define BATTERY_OFF_TXT "Right"
-#define BATTERY_ON_TXT "Left - start"
+#elif defined(HAVE_TOUCHSCREEN)
-#elif CONFIG_KEYPAD == XDUOO_X3_PAD
-#define BATTERY_ON BUTTON_PLAY
-#define BATTERY_OFF BUTTON_POWER
-#define BATTERY_ON_TXT "PLAY - start"
-#define BATTERY_OFF_TXT "POWER"
-
-#elif CONFIG_KEYPAD == IHIFI_770_PAD
-#define BATTERY_ON BUTTON_PLAY
-#define BATTERY_OFF BUTTON_POWER
-#define BATTERY_ON_TXT "PLAY - start"
-#define BATTERY_OFF_TXT "POWER"
-
-#elif CONFIG_KEYPAD == IHIFI_800_PAD
-#define BATTERY_ON BUTTON_PLAY
-#define BATTERY_OFF BUTTON_POWER
-#define BATTERY_ON_TXT "PLAY - start"
-#define BATTERY_OFF_TXT "POWER"
-
-#elif CONFIG_KEYPAD == XDUOO_X3II_PAD
-#define BATTERY_ON BUTTON_PLAY
-#define BATTERY_OFF BUTTON_POWER
-#define BATTERY_ON_TXT "Play - start"
-#define BATTERY_OFF_TXT "POWER"
-
-#elif CONFIG_KEYPAD == XDUOO_X20_PAD
-#define BATTERY_ON BUTTON_PLAY
-#define BATTERY_OFF BUTTON_POWER
-#define BATTERY_ON_TXT "Play - start"
-#define BATTERY_OFF_TXT "POWER"
-
-#elif CONFIG_KEYPAD == FIIO_M3K_PAD
-#define BATTERY_ON BUTTON_PLAY
-#define BATTERY_OFF BUTTON_POWER
-#define BATTERY_ON_TXT "Play - start"
-#define BATTERY_OFF_TXT "POWER"
-
-#else
-#error No keymap defined!
-#endif
-
-#ifdef HAVE_TOUCHSCREEN
#ifndef BATTERY_ON
#define BATTERY_ON BUTTON_CENTER
#endif
@@ -304,6 +256,9 @@
#ifndef BATTERY_OFF_TXT
#define BATTERY_OFF_TXT "TOPLEFT"
#endif
+
+#else
+#error No keymap defined!
#endif
/****************************** Plugin Entry Point ****************************/
@@ -375,7 +330,7 @@ static bool exit_tsr(bool reenter)
#define BIT_CHARGING 0x2
#define BIT_USB_POWER 0x4
-#define HMS(x) (x)/3600,((x)%3600)/60,((x)%3600)%60
+#define HMS(x) (x)/3600,((x)%3600)/60,((x)%3600)%60
#if CONFIG_CHARGING || defined(HAVE_USB_POWER)
static unsigned int charge_state(void)
@@ -476,7 +431,7 @@ static void thread(void)
rb->register_storage_idle_func(flush_buffer);
#endif
}
-
+
/* What to do when the measurement buffer is full:
1) save our measurements to disk but waste some power doing so?
2) throw away measurements to save some power?
@@ -486,12 +441,12 @@ static void thread(void)
if (buf_idx == BUF_ELEMENTS) {
flush_buffer();
}
-
+
/* sleep some time until next measurement */
rb->queue_wait_w_tmo(&thread_q, &ev, sleep_time);
switch (ev.id)
{
- case SYS_USB_CONNECTED:
+ case SYS_USB_CONNECTED:
in_usb_mode = true;
rb->usb_acknowledge(SYS_USB_CONNECTED_ACK);
break;
@@ -516,7 +471,7 @@ static void thread(void)
#else
flush_buffer();
#endif
-
+
/* log end of bench and exit reason */
fd = rb->open(BATTERY_LOG, O_RDWR | O_CREAT | O_APPEND, 0666);
if (fd >= 0)
@@ -565,7 +520,7 @@ enum plugin_status plugin_start(const void* parameter)
rb->lcd_remote_putsxy,LCD_REMOTE_WIDTH,2);
rb->lcd_remote_update();
#endif
-
+
do
{
button = rb->button_get(true);
@@ -574,10 +529,10 @@ enum plugin_status plugin_start(const void* parameter)
case BATTERY_ON:
#ifdef BATTERY_RC_ON
case BATTERY_RC_ON:
-#endif
+#endif
on = true;
- break;
- case BATTERY_OFF:
+ break;
+ case BATTERY_OFF:
#ifdef BATTERY_RC_OFF
case BATTERY_RC_OFF:
#endif
@@ -588,7 +543,7 @@ enum plugin_status plugin_start(const void* parameter)
return PLUGIN_USB_CONNECTED;
}
}while(!on);
-
+
fd = rb->open(BATTERY_LOG, O_RDONLY);
if (fd < 0)
{
diff --git a/apps/plugins/blackjack.c b/apps/plugins/blackjack.c
index b2e0383187..b5e58c5914 100644
--- a/apps/plugins/blackjack.c
+++ b/apps/plugins/blackjack.c
@@ -543,39 +543,7 @@ enum {
#define BJACK_QUIT_NAME "Volume up"
#define BJACK_DOUBLE_NAME "Option+Down"
-#elif CONFIG_KEYPAD == XDUOO_X3_PAD
-#define BJACK_SELECT_NAME "PLAY"
-#define BJACK_STAY_NAME "NEXT"
-#define BJACK_QUIT_NAME "POWER"
-#define BJACK_DOUBLE_NAME "PREV"
-#define BJACK_SELECT BUTTON_PLAY
-#define BJACK_QUIT BUTTON_POWER
-#define BJACK_MAX BUTTON_VOL_UP
-#define BJACK_MIN BUTTON_VOL_DOWN
-#define BJACK_STAY BUTTON_NEXT
-#define BJACK_DOUBLEDOWN BUTTON_PREV
-#define BJACK_UP BUTTON_HOME
-#define BJACK_DOWN BUTTON_OPTION
-#define BJACK_RIGHT BUTTON_NEXT
-#define BJACK_LEFT BUTTON_PREV
-
-#elif CONFIG_KEYPAD == XDUOO_X3II_PAD
-#define BJACK_SELECT_NAME "PLAY"
-#define BJACK_STAY_NAME "NEXT"
-#define BJACK_QUIT_NAME "POWER"
-#define BJACK_DOUBLE_NAME "PREV"
-#define BJACK_SELECT BUTTON_PLAY
-#define BJACK_QUIT BUTTON_POWER
-#define BJACK_MAX BUTTON_VOL_UP
-#define BJACK_MIN BUTTON_VOL_DOWN
-#define BJACK_STAY BUTTON_NEXT
-#define BJACK_DOUBLEDOWN BUTTON_PREV
-#define BJACK_UP BUTTON_HOME
-#define BJACK_DOWN BUTTON_OPTION
-#define BJACK_RIGHT BUTTON_NEXT
-#define BJACK_LEFT BUTTON_PREV
-
-#elif CONFIG_KEYPAD == XDUOO_X20_PAD
+#elif CONFIG_KEYPAD == XDUOO_X3_PAD || CONFIG_KEYPAD == XDUOO_X3II_PAD || CONFIG_KEYPAD == XDUOO_X20_PAD
#define BJACK_SELECT_NAME "PLAY"
#define BJACK_STAY_NAME "NEXT"
#define BJACK_QUIT_NAME "POWER"
@@ -607,7 +575,7 @@ enum {
#define BJACK_RIGHT BUTTON_NEXT
#define BJACK_LEFT BUTTON_PREV
-#elif CONFIG_KEYPAD == IHIFI_770_PAD
+#elif CONFIG_KEYPAD == IHIFI_770_PAD || CONFIG_KEYPAD == IHIFI_800_PAD
#define BJACK_SELECT_NAME "PLAY"
#define BJACK_STAY_NAME "NEXT"
#define BJACK_QUIT_NAME "POWER"
@@ -623,7 +591,7 @@ enum {
#define BJACK_RIGHT BUTTON_NEXT
#define BJACK_LEFT BUTTON_PREV
-#elif CONFIG_KEYPAD == IHIFI_800_PAD
+#elif CONFIG_KEYPAD == EROSQ_PAD
#define BJACK_SELECT_NAME "PLAY"
#define BJACK_STAY_NAME "NEXT"
#define BJACK_QUIT_NAME "POWER"
@@ -632,12 +600,12 @@ enum {
#define BJACK_QUIT BUTTON_POWER
#define BJACK_MAX BUTTON_VOL_UP
#define BJACK_MIN BUTTON_VOL_DOWN
-#define BJACK_STAY BUTTON_NEXT
-#define BJACK_DOUBLEDOWN BUTTON_PREV
-#define BJACK_UP BUTTON_HOME
-#define BJACK_DOWN (BUTTON_POWER | BUTTON_HOME)
-#define BJACK_RIGHT BUTTON_NEXT
-#define BJACK_LEFT BUTTON_PREV
+#define BJACK_STAY BUTTON_MENU
+#define BJACK_DOUBLEDOWN BUTTON_BACK
+#define BJACK_UP BUTTON_PREV
+#define BJACK_DOWN BUTTON_NEXT
+#define BJACK_RIGHT BUTTON_SCROLL_FWD
+#define BJACK_LEFT BUTTON_SCROLL_BACK
#else
#error No keymap defined!
diff --git a/apps/plugins/brickmania.c b/apps/plugins/brickmania.c
index 4452f23357..4f4ffc8df6 100644
--- a/apps/plugins/brickmania.c
+++ b/apps/plugins/brickmania.c
@@ -41,9 +41,6 @@
#include "pluginbitmaps/brickmania_break.h"
#endif
-
-
-
/*
*
* Keymaps
@@ -307,27 +304,7 @@ CONFIG_KEYPAD == SANSA_CONNECT_PAD
#define UP BUTTON_UP
#define DOWN BUTTON_DOWN
-#elif CONFIG_KEYPAD == XDUOO_X3_PAD
-#define QUIT BUTTON_POWER
-#define LEFT BUTTON_PREV
-#define RIGHT BUTTON_NEXT
-#define ALTLEFT BUTTON_VOL_DOWN
-#define ALTRIGHT BUTTON_VOL_UP
-#define SELECT BUTTON_PLAY
-#define UP BUTTON_HOME
-#define DOWN BUTTON_OPTION
-
-#elif CONFIG_KEYPAD == XDUOO_X3II_PAD
-#define QUIT BUTTON_POWER
-#define LEFT BUTTON_PREV
-#define RIGHT BUTTON_NEXT
-#define ALTLEFT BUTTON_VOL_DOWN
-#define ALTRIGHT BUTTON_VOL_UP
-#define SELECT BUTTON_PLAY
-#define UP BUTTON_HOME
-#define DOWN BUTTON_OPTION
-
-#elif CONFIG_KEYPAD == XDUOO_X20_PAD
+#elif CONFIG_KEYPAD == XDUOO_X3_PAD || CONFIG_KEYPAD == XDUOO_X3II_PAD || CONFIG_KEYPAD == XDUOO_X20_PAD
#define QUIT BUTTON_POWER
#define LEFT BUTTON_PREV
#define RIGHT BUTTON_NEXT
@@ -347,7 +324,7 @@ CONFIG_KEYPAD == SANSA_CONNECT_PAD
#define UP BUTTON_HOME
#define DOWN BUTTON_OPTION
-#elif CONFIG_KEYPAD == IHIFI_770_PAD
+#elif CONFIG_KEYPAD == IHIFI_770_PAD || CONFIG_KEYPAD == IHIFI_800_PAD
#define QUIT BUTTON_POWER
#define LEFT BUTTON_HOME
#define RIGHT BUTTON_VOL_DOWN
@@ -357,12 +334,10 @@ CONFIG_KEYPAD == SANSA_CONNECT_PAD
#define UP BUTTON_PREV
#define DOWN BUTTON_NEXT
-#elif CONFIG_KEYPAD == IHIFI_800_PAD
+#elif CONFIG_KEYPAD == EROSQ_PAD
#define QUIT BUTTON_POWER
-#define LEFT BUTTON_HOME
-#define RIGHT BUTTON_VOL_DOWN
-#define ALTLEFT (BUTTON_POWER | BUTTON_HOME)
-#define ALTRIGHT (BUTTON_POWER | BUTTON_VOL_UP)
+#define LEFT BUTTON_SCROLL_BACK
+#define RIGHT BUTTON_SCROLL_FWD
#define SELECT BUTTON_PLAY
#define UP BUTTON_PREV
#define DOWN BUTTON_NEXT
diff --git a/apps/plugins/calculator.c b/apps/plugins/calculator.c
index f02f99ee0d..77f79f9057 100644
--- a/apps/plugins/calculator.c
+++ b/apps/plugins/calculator.c
@@ -493,29 +493,7 @@ F3: equal to "="
#define CALCULATOR_CALC BUTTON_VOLUP
#define CALCULATOR_CLEAR (BUTTON_SELECT|BUTTON_REPEAT)
-#elif CONFIG_KEYPAD == XDUOO_X3_PAD
-#define CALCULATOR_LEFT BUTTON_PREV
-#define CALCULATOR_RIGHT BUTTON_NEXT
-#define CALCULATOR_UP BUTTON_HOME
-#define CALCULATOR_DOWN BUTTON_OPTION
-#define CALCULATOR_QUIT BUTTON_POWER
-#define CALCULATOR_INPUT_CALC_PRE (BUTTON_OPTION|BUTTON_REPEAT)
-#define CALCULATOR_INPUT (BUTTON_PLAY|BUTTON_REL)
-#define CALCULATOR_CALC (BUTTON_PLAY|BUTTON_REPEAT)
-#define CALCULATOR_CLEAR (BUTTON_POWER|BUTTON_REPEAT)
-
-#elif CONFIG_KEYPAD == XDUOO_X3II_PAD
-#define CALCULATOR_LEFT BUTTON_PREV
-#define CALCULATOR_RIGHT BUTTON_NEXT
-#define CALCULATOR_UP BUTTON_HOME
-#define CALCULATOR_DOWN BUTTON_OPTION
-#define CALCULATOR_QUIT BUTTON_POWER
-#define CALCULATOR_INPUT_CALC_PRE (BUTTON_OPTION|BUTTON_REPEAT)
-#define CALCULATOR_INPUT (BUTTON_PLAY|BUTTON_REL)
-#define CALCULATOR_CALC (BUTTON_PLAY|BUTTON_REPEAT)
-#define CALCULATOR_CLEAR (BUTTON_POWER|BUTTON_REPEAT)
-
-#elif CONFIG_KEYPAD == XDUOO_X20_PAD
+#elif CONFIG_KEYPAD == XDUOO_X3_PAD || CONFIG_KEYPAD == XDUOO_X3II_PAD || CONFIG_KEYPAD == XDUOO_X20_PAD
#define CALCULATOR_LEFT BUTTON_PREV
#define CALCULATOR_RIGHT BUTTON_NEXT
#define CALCULATOR_UP BUTTON_HOME
@@ -537,7 +515,7 @@ F3: equal to "="
#define CALCULATOR_CALC (BUTTON_PLAY|BUTTON_REPEAT)
#define CALCULATOR_CLEAR (BUTTON_POWER|BUTTON_REPEAT)
-#elif CONFIG_KEYPAD == IHIFI_770_PAD
+#elif CONFIG_KEYPAD == IHIFI_770_PAD || CONFIG_KEYPAD == IHIFI_800_PAD
#define CALCULATOR_LEFT BUTTON_HOME
#define CALCULATOR_RIGHT BUTTON_VOL_DOWN
#define CALCULATOR_UP BUTTON_PREV
@@ -548,16 +526,15 @@ F3: equal to "="
#define CALCULATOR_CALC (BUTTON_PLAY|BUTTON_REPEAT)
#define CALCULATOR_CLEAR (BUTTON_POWER|BUTTON_REPEAT)
-#elif CONFIG_KEYPAD == IHIFI_800_PAD
-#define CALCULATOR_LEFT BUTTON_HOME
-#define CALCULATOR_RIGHT BUTTON_VOL_DOWN
-#define CALCULATOR_UP BUTTON_PREV
-#define CALCULATOR_DOWN BUTTON_NEXT
-#define CALCULATOR_QUIT BUTTON_POWER
-#define CALCULATOR_INPUT_CALC_PRE (BUTTON_HOME|BUTTON_REPEAT)
-#define CALCULATOR_INPUT (BUTTON_PLAY|BUTTON_REL)
-#define CALCULATOR_CALC (BUTTON_PLAY|BUTTON_REPEAT)
-#define CALCULATOR_CLEAR (BUTTON_POWER|BUTTON_REPEAT)
+#elif CONFIG_KEYPAD == EROSQ_PAD
+#define CALCULATOR_LEFT BUTTON_SCROLL_BACK
+#define CALCULATOR_RIGHT BUTTON_SCROLL_FWD
+#define CALCULATOR_UP BUTTON_PREV
+#define CALCULATOR_DOWN BUTTON_NEXT
+#define CALCULATOR_QUIT BUTTON_POWER
+#define CALCULATOR_INPUT BUTTON_PLAY
+#define CALCULATOR_CALC BUTTON_MENU
+#define CALCULATOR_CLEAR BUTTON_BACK
#else
#error No keymap defined!
diff --git a/apps/plugins/calendar.c b/apps/plugins/calendar.c
index 89dcc61714..59aba941ae 100644
--- a/apps/plugins/calendar.c
+++ b/apps/plugins/calendar.c
@@ -381,27 +381,7 @@
#define CALENDAR_NEXT_MONTH (BUTTON_VOLDOWN)
#define CALENDAR_PREV_MONTH (BUTTON_VOLUP)
-#elif CONFIG_KEYPAD == XDUOO_X3_PAD
-#define CALENDAR_QUIT BUTTON_POWER
-#define CALENDAR_SELECT BUTTON_PLAY
-#define CALENDAR_NEXT_WEEK BUTTON_OPTION
-#define CALENDAR_PREV_WEEK BUTTON_HOME
-#define CALENDAR_NEXT_DAY BUTTON_NEXT
-#define CALENDAR_PREV_DAY BUTTON_PREV
-#define CALENDAR_NEXT_MONTH BUTTON_VOL_UP
-#define CALENDAR_PREV_MONTH BUTTON_VOL_DOWN
-
-#elif CONFIG_KEYPAD == XDUOO_X3II_PAD
-#define CALENDAR_QUIT BUTTON_POWER
-#define CALENDAR_SELECT BUTTON_PLAY
-#define CALENDAR_NEXT_WEEK BUTTON_OPTION
-#define CALENDAR_PREV_WEEK BUTTON_HOME
-#define CALENDAR_NEXT_DAY BUTTON_NEXT
-#define CALENDAR_PREV_DAY BUTTON_PREV
-#define CALENDAR_NEXT_MONTH BUTTON_VOL_UP
-#define CALENDAR_PREV_MONTH BUTTON_VOL_DOWN
-
-#elif CONFIG_KEYPAD == XDUOO_X20_PAD
+#elif CONFIG_KEYPAD == XDUOO_X3_PAD || CONFIG_KEYPAD == XDUOO_X3II_PAD || CONFIG_KEYPAD == XDUOO_X20_PAD
#define CALENDAR_QUIT BUTTON_POWER
#define CALENDAR_SELECT BUTTON_PLAY
#define CALENDAR_NEXT_WEEK BUTTON_OPTION
@@ -421,7 +401,7 @@
#define CALENDAR_NEXT_MONTH BUTTON_VOL_UP
#define CALENDAR_PREV_MONTH BUTTON_VOL_DOWN
-#elif CONFIG_KEYPAD == IHIFI_770_PAD
+#elif CONFIG_KEYPAD == IHIFI_770_PAD || CONFIG_KEYPAD == IHIFI_800_PAD
#define CALENDAR_QUIT BUTTON_POWER
#define CALENDAR_SELECT BUTTON_PLAY
#define CALENDAR_NEXT_WEEK (BUTTON_POWER | BUTTON_VOL_DOWN)
@@ -431,15 +411,15 @@
#define CALENDAR_NEXT_MONTH BUTTON_VOL_DOWN
#define CALENDAR_PREV_MONTH BUTTON_VOL_UP
-#elif CONFIG_KEYPAD == IHIFI_800_PAD
+#elif CONFIG_KEYPAD == EROSQ_PAD
#define CALENDAR_QUIT BUTTON_POWER
#define CALENDAR_SELECT BUTTON_PLAY
-#define CALENDAR_NEXT_WEEK (BUTTON_POWER | BUTTON_VOL_DOWN)
-#define CALENDAR_PREV_WEEK (BUTTON_POWER | BUTTON_VOL_UP)
-#define CALENDAR_NEXT_DAY BUTTON_NEXT
-#define CALENDAR_PREV_DAY BUTTON_PREV
-#define CALENDAR_NEXT_MONTH BUTTON_VOL_DOWN
-#define CALENDAR_PREV_MONTH BUTTON_VOL_UP
+#define CALENDAR_NEXT_WEEK BUTTON_NEXT
+#define CALENDAR_PREV_WEEK BUTTON_PREV
+#define CALENDAR_NEXT_DAY BUTTON_SCROLL_FWD
+#define CALENDAR_PREV_DAY BUTTON_SCROLL_BACK
+#define CALENDAR_NEXT_MONTH BUTTON_VOL_UP
+#define CALENDAR_PREV_MONTH BUTTON_VOL_DOWN
#else
#error "No keypad setting."
diff --git a/apps/plugins/chessbox/chessbox_pgn.h b/apps/plugins/chessbox/chessbox_pgn.h
index 567dcb1acb..e9b66787ee 100644
--- a/apps/plugins/chessbox/chessbox_pgn.h
+++ b/apps/plugins/chessbox/chessbox_pgn.h
@@ -525,21 +525,7 @@
#define CB_SCROLL_LEFT (BUTTON_PREV|BUTTON_REPEAT)
#define CB_SCROLL_RIGHT (BUTTON_NEXT|BUTTON_REPEAT)
-#elif CONFIG_KEYPAD == XDUOO_X3II_PAD
-#define CB_SELECT BUTTON_PLAY
-#define CB_UP BUTTON_HOME
-#define CB_DOWN BUTTON_OPTION
-#define CB_LEFT BUTTON_PREV
-#define CB_RIGHT BUTTON_NEXT
-#define CB_PLAY BUTTON_VOL_UP
-#define CB_LEVEL BUTTON_VOL_DOWN
-#define CB_MENU BUTTON_POWER
-#define CB_SCROLL_UP (BUTTON_HOME|BUTTON_REPEAT)
-#define CB_SCROLL_DOWN (BUTTON_OPTION|BUTTON_REPEAT)
-#define CB_SCROLL_LEFT (BUTTON_PREV|BUTTON_REPEAT)
-#define CB_SCROLL_RIGHT (BUTTON_NEXT|BUTTON_REPEAT)
-
-#elif CONFIG_KEYPAD == XDUOO_X20_PAD
+#elif CONFIG_KEYPAD == XDUOO_X3II_PAD || CONFIG_KEYPAD == XDUOO_X20_PAD
#define CB_SELECT BUTTON_PLAY
#define CB_UP BUTTON_HOME
#define CB_DOWN BUTTON_OPTION
@@ -567,7 +553,7 @@
#define CB_SCROLL_LEFT (BUTTON_PREV|BUTTON_REPEAT)
#define CB_SCROLL_RIGHT (BUTTON_NEXT|BUTTON_REPEAT)
-#elif CONFIG_KEYPAD == IHIFI_770_PAD
+#elif CONFIG_KEYPAD == IHIFI_770_PAD || CONFIG_KEYPAD == IHIFI_800_PAD
#define CB_SELECT BUTTON_PLAY
#define CB_UP BUTTON_PREV
#define CB_DOWN BUTTON_NEXT
@@ -581,19 +567,19 @@
#define CB_SCROLL_LEFT (BUTTON_HOME|BUTTON_REPEAT)
#define CB_SCROLL_RIGHT (BUTTON_VOL_UP|BUTTON_REPEAT)
-#elif CONFIG_KEYPAD == IHIFI_800_PAD
+#elif CONFIG_KEYPAD == EROSQ_PAD
#define CB_SELECT BUTTON_PLAY
#define CB_UP BUTTON_PREV
#define CB_DOWN BUTTON_NEXT
-#define CB_LEFT BUTTON_HOME
-#define CB_RIGHT BUTTON_VOL_DOWN
-#define CB_PLAY BUTTON_VOL_UP
-#define CB_LEVEL (BUTTON_PLAY|BUTTON_REPEAT)
-#define CB_MENU BUTTON_POWER
+#define CB_LEFT BUTTON_SCROLL_BACK
+#define CB_RIGHT BUTTON_SCROLL_FWD
+#define CB_PLAY BUTTON_VOL_DOWN
+#define CB_MENU BUTTON_MENU
+#define CB_LEVEL BUTTON_VOL_UP
#define CB_SCROLL_UP (BUTTON_PREV|BUTTON_REPEAT)
#define CB_SCROLL_DOWN (BUTTON_NEXT|BUTTON_REPEAT)
-#define CB_SCROLL_LEFT (BUTTON_HOME|BUTTON_REPEAT)
-#define CB_SCROLL_RIGHT (BUTTON_VOL_UP|BUTTON_REPEAT)
+#define CB_SCROLL_LEFT (BUTTON_SCROLL_BACK|BUTTON_REPEAT)
+#define CB_SCROLL_RIGHT (BUTTON_SCROLL_FWD|BUTTON_REPEAT)
#else
#error No keymap defined!
diff --git a/apps/plugins/chessclock.c b/apps/plugins/chessclock.c
index aee9c9f8e7..27b3990b8b 100644
--- a/apps/plugins/chessclock.c
+++ b/apps/plugins/chessclock.c
@@ -366,27 +366,7 @@
#define CHC_SETTINGS_CANCEL BUTTON_RIGHT
#define CHC_SETTINGS_OK (BUTTON_SELECT|BUTTON_REPEAT)
-#elif CONFIG_KEYPAD == XDUOO_X3_PAD
-#define CHC_QUIT BUTTON_POWER
-#define CHC_STARTSTOP BUTTON_PLAY
-#define CHC_RESET BUTTON_OPTION
-#define CHC_MENU BUTTON_HOME
-#define CHC_SETTINGS_INC BUTTON_NEXT
-#define CHC_SETTINGS_DEC BUTTON_PREV
-#define CHC_SETTINGS_OK BUTTON_PLAY
-#define CHC_SETTINGS_CANCEL BUTTON_POWER
-
-#elif CONFIG_KEYPAD == XDUOO_X3II_PAD
-#define CHC_QUIT BUTTON_POWER
-#define CHC_STARTSTOP BUTTON_PLAY
-#define CHC_RESET BUTTON_OPTION
-#define CHC_MENU BUTTON_HOME
-#define CHC_SETTINGS_INC BUTTON_NEXT
-#define CHC_SETTINGS_DEC BUTTON_PREV
-#define CHC_SETTINGS_OK BUTTON_PLAY
-#define CHC_SETTINGS_CANCEL BUTTON_POWER
-
-#elif CONFIG_KEYPAD == XDUOO_X20_PAD
+#elif (CONFIG_KEYPAD == XDUOO_X3_PAD) || (CONFIG_KEYPAD == XDUOO_X3II_PAD) || (CONFIG_KEYPAD == XDUOO_X20_PAD)
#define CHC_QUIT BUTTON_POWER
#define CHC_STARTSTOP BUTTON_PLAY
#define CHC_RESET BUTTON_OPTION
@@ -406,7 +386,7 @@
#define CHC_SETTINGS_OK BUTTON_PLAY
#define CHC_SETTINGS_CANCEL BUTTON_POWER
-#elif CONFIG_KEYPAD == IHIFI_770_PAD
+#elif (CONFIG_KEYPAD == IHIFI_770_PAD) || (CONFIG_KEYPAD == IHIFI_800_PAD)
#define CHC_QUIT BUTTON_POWER
#define CHC_STARTSTOP BUTTON_PLAY
#define CHC_RESET (BUTTON_PLAY|BUTTON_REPEAT)
@@ -416,15 +396,15 @@
#define CHC_SETTINGS_OK BUTTON_PLAY
#define CHC_SETTINGS_CANCEL BUTTON_HOME
-#elif CONFIG_KEYPAD == IHIFI_800_PAD
+#elif CONFIG_KEYPAD == EROSQ_PAD
#define CHC_QUIT BUTTON_POWER
#define CHC_STARTSTOP BUTTON_PLAY
-#define CHC_RESET (BUTTON_PLAY|BUTTON_REPEAT)
-#define CHC_MENU BUTTON_HOME
-#define CHC_SETTINGS_INC BUTTON_VOL_UP
-#define CHC_SETTINGS_DEC BUTTON_VOL_DOWN
+#define CHC_RESET BUTTON_BACK
+#define CHC_MENU BUTTON_MENU
+#define CHC_SETTINGS_INC BUTTON_NEXT
+#define CHC_SETTINGS_DEC BUTTON_PREV
#define CHC_SETTINGS_OK BUTTON_PLAY
-#define CHC_SETTINGS_CANCEL BUTTON_HOME
+#define CHC_SETTINGS_CANCEL BUTTON_POWER
#else
#error No keymap defined!
@@ -481,7 +461,7 @@ static struct {
} timer_holder[MAX_PLAYERS];
static int run_timer(int nr);
-static int chessclock_set_int(char* string,
+static int chessclock_set_int(char* string,
int* variable,
int step,
int min,
@@ -784,7 +764,7 @@ static int run_timer(int nr)
return retval;
}
-static int chessclock_set_int(char* string,
+static int chessclock_set_int(char* string,
int* variable,
int step,
int min,
@@ -856,4 +836,3 @@ static char * show_time(int seconds)
rb->snprintf(buf, sizeof(buf), "%02d:%02d", seconds/60, seconds%60);
return buf;
}
-
diff --git a/apps/plugins/chip8.c b/apps/plugins/chip8.c
index bbea442d8e..84e8e709c4 100644
--- a/apps/plugins/chip8.c
+++ b/apps/plugins/chip8.c
@@ -57,7 +57,7 @@
#ifndef EXTERN
#define EXTERN extern
#endif
-
+
typedef unsigned char byte; /* sizeof(byte)==1 */
typedef unsigned short word; /* sizeof(word)>=2 */
@@ -390,11 +390,11 @@ static void op_system (word opcode)
break;
case 0xfc:
scroll_left();
- break;
+ break;
case 0xfd:
DBG_(printf("SUPER: quit the emulator\n"));
chip8_reset();
- break;
+ break;
case 0xfe:
DBG_(printf("SUPER: set CHIP-8 graphic mode\n"));
memset (chip8_display,0,sizeof(chip8_display));
@@ -404,7 +404,7 @@ static void op_system (word opcode)
DBG_(printf("SUPER: set SCHIP graphic mode\n"));
memset (chip8_display,0,sizeof(chip8_display));
chip8_super = 1;
- break;
+ break;
#endif
case 0xe0:
memset (chip8_display,0,sizeof(chip8_display));
@@ -553,7 +553,7 @@ static void op_sprite (word opcode)
x &= 64-1;
y &= 32-1;
q=chip8_display+y*CHIP8_WIDTH*2;
- if(n == 0)
+ if(n == 0)
n = 16;
if (n+y>32)
n=32-y;
@@ -838,7 +838,7 @@ STATIC void chip8_execute(void)
--chip8_regs.delay;
if (chip8_regs.sound)
if (--chip8_regs.sound == 0)
- chip8_sound_off();
+ chip8_sound_off();
/* Update the machine status */
chip8_interrupt ();
@@ -1092,7 +1092,7 @@ CONFIG_KEYPAD == SANSA_M200_PAD
#define CHIP8_KEY8 BUTTON_DOWN
#define CHIP8_KEY9 BUTTON_VIEW
#define CHIP8_KEY0 BUTTON_VOL_DOWN
-
+
#elif CONFIG_KEYPAD == PHILIPS_SA9200_PAD
#define CHIP8_OFF BUTTON_POWER
#define CHIP8_KEY1 BUTTON_LEFT
@@ -1251,23 +1251,7 @@ CONFIG_KEYPAD == MROBE500_PAD
#define CHIP8_KEY6 BUTTON_RIGHT
#define CHIP8_KEY8 BUTTON_LEFT
-#elif CONFIG_KEYPAD == XDUOO_X3_PAD
-#define CHIP8_OFF BUTTON_POWER
-#define CHIP8_KEY2 BUTTON_HOME
-#define CHIP8_KEY4 BUTTON_PREV
-#define CHIP8_KEY5 BUTTON_PLAY
-#define CHIP8_KEY6 BUTTON_NEXT
-#define CHIP8_KEY8 BUTTON_OPTION
-
-#elif CONFIG_KEYPAD == XDUOO_X3II_PAD
-#define CHIP8_OFF BUTTON_POWER
-#define CHIP8_KEY2 BUTTON_HOME
-#define CHIP8_KEY4 BUTTON_PREV
-#define CHIP8_KEY5 BUTTON_PLAY
-#define CHIP8_KEY6 BUTTON_NEXT
-#define CHIP8_KEY8 BUTTON_OPTION
-
-#elif CONFIG_KEYPAD == XDUOO_X20_PAD
+#elif CONFIG_KEYPAD == XDUOO_X3_PAD || CONFIG_KEYPAD == XDUOO_X3II_PAD || CONFIG_KEYPAD == XDUOO_X20_PAD
#define CHIP8_OFF BUTTON_POWER
#define CHIP8_KEY2 BUTTON_HOME
#define CHIP8_KEY4 BUTTON_PREV
@@ -1283,7 +1267,7 @@ CONFIG_KEYPAD == MROBE500_PAD
#define CHIP8_KEY6 BUTTON_NEXT
#define CHIP8_KEY8 BUTTON_OPTION
-#elif CONFIG_KEYPAD == IHIFI_770_PAD
+#elif CONFIG_KEYPAD == IHIFI_770_PAD || CONFIG_KEYPAD == IHIFI_800_PAD
#define CHIP8_OFF BUTTON_POWER
#define CHIP8_KEY2 BUTTON_NEXT
#define CHIP8_KEY4 BUTTON_HOME
@@ -1291,12 +1275,12 @@ CONFIG_KEYPAD == MROBE500_PAD
#define CHIP8_KEY6 BUTTON_VOL_DOWN
#define CHIP8_KEY8 BUTTON_PREV
-#elif CONFIG_KEYPAD == IHIFI_800_PAD
+#elif CONFIG_KEYPAD == EROSQ_PAD
#define CHIP8_OFF BUTTON_POWER
#define CHIP8_KEY2 BUTTON_NEXT
-#define CHIP8_KEY4 BUTTON_HOME
-#define CHIP8_KEY5 BUTTON_VOL_UP
-#define CHIP8_KEY6 BUTTON_VOL_DOWN
+#define CHIP8_KEY4 BUTTON_MENU
+#define CHIP8_KEY5 BUTTON_PLAY
+#define CHIP8_KEY6 BUTTON_BACK
#define CHIP8_KEY8 BUTTON_PREV
#else
@@ -1342,15 +1326,15 @@ static unsigned long cycles; /* Number of update cycles (50Hz) */
/****************************************************************************/
/* Turn sound on */
/****************************************************************************/
-static void chip8_sound_on (void)
+static void chip8_sound_on (void)
{
}
/****************************************************************************/
/* Turn sound off */
/****************************************************************************/
-static void chip8_sound_off (void)
-{
+static void chip8_sound_off (void)
+{
}
/****************************************************************************/
@@ -1587,7 +1571,7 @@ enum plugin_status plugin_start(const void* parameter)
}
else
{
- filename = (char*) parameter;
+ filename = (char*) parameter;
}
/* now go ahead and have fun! */
diff --git a/apps/plugins/chopper.c b/apps/plugins/chopper.c
index 6e9f923460..35c80a960b 100644
--- a/apps/plugins/chopper.c
+++ b/apps/plugins/chopper.c
@@ -198,32 +198,7 @@ CONFIG_KEYPAD == MROBE500_PAD
#define ACTION BUTTON_SELECT
#define ACTIONTEXT "Select"
-#elif CONFIG_KEYPAD == XDUOO_X3_PAD
-#define QUIT BUTTON_POWER
-#define ACTION BUTTON_PLAY
-#define ACTIONTEXT "PLAY"
-
-#elif CONFIG_KEYPAD == XDUOO_X3II_PAD
-#define QUIT BUTTON_POWER
-#define ACTION BUTTON_PLAY
-#define ACTIONTEXT "PLAY"
-
-#elif CONFIG_KEYPAD == XDUOO_X20_PAD
-#define QUIT BUTTON_POWER
-#define ACTION BUTTON_PLAY
-#define ACTIONTEXT "PLAY"
-
-#elif CONFIG_KEYPAD == FIIO_M3K_PAD
-#define QUIT BUTTON_POWER
-#define ACTION BUTTON_PLAY
-#define ACTIONTEXT "PLAY"
-
-#elif CONFIG_KEYPAD == IHIFI_770_PAD
-#define QUIT BUTTON_POWER
-#define ACTION BUTTON_PLAY
-#define ACTIONTEXT "PLAY"
-
-#elif CONFIG_KEYPAD == IHIFI_800_PAD
+#elif CONFIG_KEYPAD == XDUOO_X3_PAD || CONFIG_KEYPAD == XDUOO_X3II_PAD || CONFIG_KEYPAD == XDUOO_X20_PAD || CONFIG_KEYPAD == FIIO_M3K_PAD || CONFIG_KEYPAD == IHIFI_770_PAD || CONFIG_KEYPAD == IHIFI_800_PAD || CONFIG_KEYPAD == EROSQ_PAD
#define QUIT BUTTON_POWER
#define ACTION BUTTON_PLAY
#define ACTIONTEXT "PLAY"
@@ -735,7 +710,7 @@ static void chopDrawScene(void)
#elif LCD_DEPTH == 2
rb->lcd_set_foreground(LCD_WHITE);
#endif
-
+
#if LCD_WIDTH <= 128
rb->snprintf(s, sizeof(s), "Dist: %d", score);
#else
@@ -781,7 +756,7 @@ static int chopMenu(int menunum)
{ "Normal", -1 },
{ "Steep", -1 },
};
-
+
MENUITEM_STRINGLIST(menu,"Chopper Menu",chopMenuCb,
"Resume Game","Start New Game",
"Level","Playback Control","Quit");
diff --git a/apps/plugins/clix.c b/apps/plugins/clix.c
index d6b28b54b9..08264e8490 100644
--- a/apps/plugins/clix.c
+++ b/apps/plugins/clix.c
@@ -284,15 +284,7 @@
#define CLIX_BUTTON_RIGHT BUTTON_NEXT
#define CLIX_BUTTON_CLICK BUTTON_PLAY
-#elif CONFIG_KEYPAD == XDUOO_X3II_PAD
-#define CLIX_BUTTON_QUIT BUTTON_POWER
-#define CLIX_BUTTON_UP BUTTON_HOME
-#define CLIX_BUTTON_DOWN BUTTON_OPTION
-#define CLIX_BUTTON_LEFT BUTTON_PREV
-#define CLIX_BUTTON_RIGHT BUTTON_NEXT
-#define CLIX_BUTTON_CLICK BUTTON_PLAY
-
-#elif CONFIG_KEYPAD == XDUOO_X20_PAD
+#elif CONFIG_KEYPAD == XDUOO_X3II_PAD || CONFIG_KEYPAD == XDUOO_X20_PAD
#define CLIX_BUTTON_QUIT BUTTON_POWER
#define CLIX_BUTTON_UP BUTTON_HOME
#define CLIX_BUTTON_DOWN BUTTON_OPTION
@@ -308,7 +300,7 @@
#define CLIX_BUTTON_RIGHT BUTTON_NEXT
#define CLIX_BUTTON_CLICK BUTTON_PLAY
-#elif CONFIG_KEYPAD == IHIFI_770_PAD
+#elif CONFIG_KEYPAD == IHIFI_770_PAD || CONFIG_KEYPAD == IHIFI_800_PAD
#define CLIX_BUTTON_QUIT BUTTON_POWER
#define CLIX_BUTTON_UP BUTTON_PREV
#define CLIX_BUTTON_DOWN BUTTON_NEXT
@@ -316,13 +308,13 @@
#define CLIX_BUTTON_RIGHT BUTTON_VOL_DOWN
#define CLIX_BUTTON_CLICK BUTTON_VOL_UP
-#elif CONFIG_KEYPAD == IHIFI_800_PAD
+#elif CONFIG_KEYPAD == EROSQ_PAD
#define CLIX_BUTTON_QUIT BUTTON_POWER
#define CLIX_BUTTON_UP BUTTON_PREV
#define CLIX_BUTTON_DOWN BUTTON_NEXT
-#define CLIX_BUTTON_LEFT BUTTON_HOME
-#define CLIX_BUTTON_RIGHT BUTTON_VOL_DOWN
-#define CLIX_BUTTON_CLICK BUTTON_VOL_UP
+#define CLIX_BUTTON_LEFT BUTTON_SCROLL_BACK
+#define CLIX_BUTTON_RIGHT BUTTON_SCROLL_FWD
+#define CLIX_BUTTON_CLICK BUTTON_PLAY
#else
#error "no keymap"
diff --git a/apps/plugins/cube.c b/apps/plugins/cube.c
index 87ab5c1102..416bf1105d 100644
--- a/apps/plugins/cube.c
+++ b/apps/plugins/cube.c
@@ -370,27 +370,7 @@
#define CUBE_HIGHSPEED (BUTTON_SELECT | BUTTON_REPEAT)
#define CUBE_PAUSE (BUTTON_LEFT | BUTTON_REPEAT)
-#elif (CONFIG_KEYPAD == XDUOO_X3_PAD)
-#define CUBE_QUIT BUTTON_POWER
-#define CUBE_NEXT BUTTON_NEXT
-#define CUBE_PREV BUTTON_PREV
-#define CUBE_INC BUTTON_VOL_UP
-#define CUBE_DEC BUTTON_VOL_DOWN
-#define CUBE_MODE BUTTON_OPTION
-#define CUBE_PAUSE BUTTON_HOME
-#define CUBE_HIGHSPEED BUTTON_PLAY
-
-#elif (CONFIG_KEYPAD == XDUOO_X3II_PAD)
-#define CUBE_QUIT BUTTON_POWER
-#define CUBE_NEXT BUTTON_NEXT
-#define CUBE_PREV BUTTON_PREV
-#define CUBE_INC BUTTON_VOL_UP
-#define CUBE_DEC BUTTON_VOL_DOWN
-#define CUBE_MODE BUTTON_OPTION
-#define CUBE_PAUSE BUTTON_HOME
-#define CUBE_HIGHSPEED BUTTON_PLAY
-
-#elif (CONFIG_KEYPAD == XDUOO_X20_PAD)
+#elif (CONFIG_KEYPAD == XDUOO_X3_PAD) || (CONFIG_KEYPAD == XDUOO_X3II_PAD) || (CONFIG_KEYPAD == XDUOO_X20_PAD)
#define CUBE_QUIT BUTTON_POWER
#define CUBE_NEXT BUTTON_NEXT
#define CUBE_PREV BUTTON_PREV
@@ -410,7 +390,7 @@
#define CUBE_PAUSE BUTTON_HOME
#define CUBE_HIGHSPEED BUTTON_PLAY
-#elif (CONFIG_KEYPAD == IHIFI_770_PAD)
+#elif (CONFIG_KEYPAD == IHIFI_770_PAD) || (CONFIG_KEYPAD == IHIFI_800_PAD)
#define CUBE_QUIT BUTTON_POWER
#define CUBE_NEXT BUTTON_NEXT
#define CUBE_PREV BUTTON_PREV
@@ -420,14 +400,14 @@
#define CUBE_PAUSE BUTTON_HOME
#define CUBE_HIGHSPEED BUTTON_PLAY
-#elif (CONFIG_KEYPAD == IHIFI_800_PAD)
+#elif CONFIG_KEYPAD == EROSQ_PAD
#define CUBE_QUIT BUTTON_POWER
#define CUBE_NEXT BUTTON_NEXT
#define CUBE_PREV BUTTON_PREV
-#define CUBE_INC BUTTON_VOL_UP
-#define CUBE_DEC BUTTON_VOL_DOWN
-#define CUBE_MODE (BUTTON_HOME | BUTTON_POWER)
-#define CUBE_PAUSE BUTTON_HOME
+#define CUBE_INC BUTTON_SCROLL_FWD
+#define CUBE_DEC BUTTON_SCROLL_BACK
+#define CUBE_MODE BUTTON_MENU
+#define CUBE_PAUSE BUTTON_BACK
#define CUBE_HIGHSPEED BUTTON_PLAY
#else
@@ -666,7 +646,7 @@ static void cube_draw(void)
{
#if LCD_DEPTH > 1 || defined(USEGSLIB)
case SOLID:
-
+
old_foreground = mylcd_get_foreground();
for (i = 0; i < 6; i++)
{
@@ -882,7 +862,7 @@ enum plugin_status plugin_start(const void* parameter)
t_disp = DISP_TIME;
redraw = true;
break;
-
+
case CUBE_NEXT:
if (++curr > 2)
curr = 0;
@@ -947,5 +927,3 @@ enum plugin_status plugin_start(const void* parameter)
return PLUGIN_OK;
}
-
-
diff --git a/apps/plugins/doom/i_video.c b/apps/plugins/doom/i_video.c
index cd3cd90edd..1fb913fbed 100644
--- a/apps/plugins/doom/i_video.c
+++ b/apps/plugins/doom/i_video.c
@@ -566,18 +566,7 @@ void I_ShutdownGraphics(void)
#define DOOMBUTTON_ENTER BUTTON_PLAY
#define DOOMBUTTON_WEAPON BUTTON_VOL_UP
-#elif CONFIG_KEYPAD == XDUOO_X3II_PAD
-#define DOOMBUTTON_UP BUTTON_HOME
-#define DOOMBUTTON_DOWN BUTTON_OPTION
-#define DOOMBUTTON_LEFT BUTTON_PREV
-#define DOOMBUTTON_RIGHT BUTTON_NEXT
-#define DOOMBUTTON_SHOOT BUTTON_PLAY
-#define DOOMBUTTON_OPEN (BUTTON_HOME | BUTTON_POWER)
-#define DOOMBUTTON_ESC BUTTON_POWER
-#define DOOMBUTTON_ENTER BUTTON_PLAY
-#define DOOMBUTTON_WEAPON BUTTON_VOL_UP
-
-#elif CONFIG_KEYPAD == XDUOO_X20_PAD
+#elif CONFIG_KEYPAD == XDUOO_X3II_PAD || CONFIG_KEYPAD == XDUOO_X20_PAD
#define DOOMBUTTON_UP BUTTON_HOME
#define DOOMBUTTON_DOWN BUTTON_OPTION
#define DOOMBUTTON_LEFT BUTTON_PREV
@@ -599,7 +588,7 @@ void I_ShutdownGraphics(void)
#define DOOMBUTTON_ENTER BUTTON_PLAY
#define DOOMBUTTON_WEAPON BUTTON_VOL_UP
-#elif CONFIG_KEYPAD == IHIFI_770_PAD
+#elif CONFIG_KEYPAD == IHIFI_770_PAD || CONFIG_KEYPAD == IHIFI_800_PAD
#define DOOMBUTTON_UP BUTTON_PREV
#define DOOMBUTTON_DOWN BUTTON_NEXT
#define DOOMBUTTON_LEFT BUTTON_HOME
@@ -611,17 +600,17 @@ void I_ShutdownGraphics(void)
#define DOOMBUTTON_WEAPON (BUTTON_PLAY|BUTTON_REPEAT)
#define DOOMBUTTON_MAP (BUTTON_POWER|BUTTON_REPEAT)
-#elif CONFIG_KEYPAD == IHIFI_800_PAD
+#elif CONFIG_KEYPAD == EROSQ_PAD
#define DOOMBUTTON_UP BUTTON_PREV
#define DOOMBUTTON_DOWN BUTTON_NEXT
-#define DOOMBUTTON_LEFT BUTTON_HOME
-#define DOOMBUTTON_RIGHT BUTTON_VOL_DOWN
-#define DOOMBUTTON_OPEN BUTTON_PLAY
-#define DOOMBUTTON_ESC BUTTON_POWER
-#define DOOMBUTTON_ENTER BUTTON_VOL_UP
-#define DOOMBUTTON_SHOOT BUTTON_VOL_UP
-#define DOOMBUTTON_WEAPON (BUTTON_PLAY|BUTTON_REPEAT)
-#define DOOMBUTTON_MAP (BUTTON_POWER|BUTTON_REPEAT)
+#define DOOMBUTTON_LEFT BUTTON_SCROLL_BACK
+#define DOOMBUTTON_RIGHT BUTTON_SCROLL_FWD
+#define DOOMBUTTON_SHOOT BUTTON_PLAY
+#define DOOMBUTTON_OPEN BUTTON_BACK
+#define DOOMBUTTON_ESC BUTTON_MENU
+#define DOOMBUTTON_ENTER BUTTON_PLAY
+#define DOOMBUTTON_WEAPON BUTTON_VOL_UP
+#define DOOMBUTTON_MAP BUTTON_VOL_DOWN
#else
#error Keymap not defined!
@@ -745,7 +734,7 @@ static inline void getkey()
D_PostEvent(&event);
}
#endif
-#endif
+#endif
newbuttonstate = rb->button_status();
#ifdef DOOMBUTTON_SCROLLWHEEL
newbuttonstate |= read_scroll_wheel();
@@ -954,7 +943,7 @@ void I_FinishUpdate (void)
{
int count;
byte *src = d_screens[0];
-
+
#if (CONFIG_LCD == LCD_H300) && !defined(SIMULATOR)
count = SCREENWIDTH*SCREENHEIGHT;
@@ -1091,7 +1080,7 @@ void I_FinishUpdate (void)
*dst++ = palette[*src++];
while (--count);
}
- rb->lcd_update();
+ rb->lcd_update();
#else /* !HAVE_LCD_COLOR */
unsigned char *dst;
@@ -1108,8 +1097,8 @@ void I_FinishUpdate (void)
grey_ub_gray_bitmap(greybuffer, 0, y, SCREENWIDTH, 1);
}
-#endif
-#endif
+#endif
+#endif
}
//
@@ -1136,7 +1125,7 @@ void I_InitGraphics(void)
printf("Starting Graphics engine\n");
noprintf=1;
-
+
#if defined(HAVE_LCD_MODES)
#if (HAVE_LCD_MODES & LCD_MODE_PAL256)
rb->lcd_set_mode(LCD_MODE_PAL256);
diff --git a/apps/plugins/fft/fft.c b/apps/plugins/fft/fft.c
index eeb6611488..4719446475 100644
--- a/apps/plugins/fft/fft.c
+++ b/apps/plugins/fft/fft.c
@@ -334,16 +334,7 @@ GREY_INFO_STRUCT
# define FFT_AMP_SCALE BUTTON_PLAY
# define FFT_QUIT BUTTON_POWER
-#elif (CONFIG_KEYPAD == XDUOO_X3II_PAD)
-# define FFT_PREV_GRAPH BUTTON_PREV
-# define FFT_NEXT_GRAPH BUTTON_NEXT
-# define FFT_ORIENTATION BUTTON_HOME
-# define FFT_FREQ_SCALE BUTTON_OPTION
-# define FFT_WINDOW (BUTTON_HOME|BUTTON_POWER)
-# define FFT_AMP_SCALE BUTTON_PLAY
-# define FFT_QUIT BUTTON_POWER
-
-#elif (CONFIG_KEYPAD == XDUOO_X20_PAD)
+#elif (CONFIG_KEYPAD == XDUOO_X3II_PAD) || (CONFIG_KEYPAD == XDUOO_X20_PAD)
# define FFT_PREV_GRAPH BUTTON_PREV
# define FFT_NEXT_GRAPH BUTTON_NEXT
# define FFT_ORIENTATION BUTTON_HOME
@@ -361,7 +352,7 @@ GREY_INFO_STRUCT
# define FFT_AMP_SCALE BUTTON_PLAY
# define FFT_QUIT BUTTON_POWER
-#elif (CONFIG_KEYPAD == IHIFI_770_PAD)
+#elif (CONFIG_KEYPAD == IHIFI_770_PAD) || (CONFIG_KEYPAD == IHIFI_800_PAD)
# define FFT_PREV_GRAPH BUTTON_PREV
# define FFT_NEXT_GRAPH BUTTON_NEXT
# define FFT_ORIENTATION BUTTON_HOME
@@ -370,13 +361,13 @@ GREY_INFO_STRUCT
# define FFT_AMP_SCALE BUTTON_PLAY
# define FFT_QUIT BUTTON_POWER
-#elif (CONFIG_KEYPAD == IHIFI_800_PAD)
-# define FFT_PREV_GRAPH BUTTON_PREV
-# define FFT_NEXT_GRAPH BUTTON_NEXT
-# define FFT_ORIENTATION BUTTON_HOME
-# define FFT_FREQ_SCALE BUTTON_VOL_UP
-# define FFT_WINDOW BUTTON_VOL_DOWN
-# define FFT_AMP_SCALE BUTTON_PLAY
+#elif (CONFIG_KEYPAD == EROSQ_PAD)
+# define FFT_PREV_GRAPH BUTTON_SCROLL_BACK
+# define FFT_NEXT_GRAPH BUTTON_SCROLL_FWD
+# define FFT_ORIENTATION BUTTON_VOL_UP
+# define FFT_FREQ_SCALE BUTTON_VOL_DOWN
+# define FFT_WINDOW BUTTON_BACK
+# define FFT_AMP_SCALE BUTTON_MENU
# define FFT_QUIT BUTTON_POWER
#elif !defined(HAVE_TOUCHSCREEN)
@@ -530,7 +521,7 @@ static struct fft_config
int amp_scale;
int freq_scale;
int window_func;
-} fft_disk =
+} fft_disk =
{
/* Defaults */
.orientation = FFT_OR_VERT,
@@ -647,7 +638,7 @@ static void apply_window_func(enum fft_window_func mode)
/* Calculates the magnitudes from complex numbers and returns the maximum */
static unsigned calc_magnitudes(enum fft_amp_scale scale)
{
- /* A major assumption made when calculating the Q*MAX constants
+ /* A major assumption made when calculating the Q*MAX constants
* is that the maximum magnitude is 29 bits long. */
unsigned this_max = 0;
kiss_fft_cpx *this_output = output[output_head] + 1; /* skip DC */
@@ -806,7 +797,7 @@ static void draw_lines_vertical(unsigned this_max, unsigned graph_max)
{
int bins_acc = LCD_WIDTH / 2;
unsigned bins_max = 0;
-
+
for(int i = 0, x = 0; i < ARRAYLEN_PLOT; ++i)
{
unsigned bin = plot[i];
@@ -1107,7 +1098,7 @@ static inline bool fft_get_fft(void)
/* This block can introduce discontinuities in our data. Meaning, the
* FFT will not be done a continuous segment of the signal. Which can
* be bad. Or not.
- *
+ *
* Anyway, this is a demo, not a scientific tool. If you want accuracy,
* do a proper spectrum analysis.*/
@@ -1409,7 +1400,7 @@ static void fft_setting_update(unsigned which)
[FFT_OR_HORZ] = draw_bars_horizontal,
[FFT_OR_VERT] = draw_bars_vertical,
},
- [FFT_DM_SPECTROGRAM] =
+ [FFT_DM_SPECTROGRAM] =
{
[FFT_OR_HORZ] = draw_spectrogram_horizontal,
[FFT_OR_VERT] = draw_spectrogram_vertical,
@@ -1533,7 +1524,7 @@ static void fft_cleanup(void)
{
myosd_destroy();
- fft_close_fft();
+ fft_close_fft();
#ifdef HAVE_ADJUSTABLE_CPU_FREQ
rb->cancel_cpu_boost();
diff --git a/apps/plugins/flipit.c b/apps/plugins/flipit.c
index 4fe0681417..a4d59fff3d 100644
--- a/apps/plugins/flipit.c
+++ b/apps/plugins/flipit.c
@@ -436,31 +436,7 @@
#define FLIPIT_STEP_BY_STEP (BUTTON_LEFT|BUTTON_VOLUP)
#define FLIPIT_TOGGLE BUTTON_SELECT
-#elif CONFIG_KEYPAD == XDUOO_X3_PAD
-
-#define FLIPIT_LEFT BUTTON_PREV
-#define FLIPIT_RIGHT BUTTON_NEXT
-#define FLIPIT_UP BUTTON_HOME
-#define FLIPIT_DOWN BUTTON_OPTION
-#define FLIPIT_QUIT BUTTON_POWER
-#define FLIPIT_SHUFFLE (BUTTON_HOME | BUTTON_PREV)
-#define FLIPIT_SOLVE (BUTTON_HOME | BUTTON_NEXT)
-#define FLIPIT_STEP_BY_STEP (BUTTON_HOME | BUTTON_PLAY)
-#define FLIPIT_TOGGLE BUTTON_PLAY
-
-#elif CONFIG_KEYPAD == XDUOO_X3II_PAD
-
-#define FLIPIT_LEFT BUTTON_PREV
-#define FLIPIT_RIGHT BUTTON_NEXT
-#define FLIPIT_UP BUTTON_HOME
-#define FLIPIT_DOWN BUTTON_OPTION
-#define FLIPIT_QUIT BUTTON_POWER
-#define FLIPIT_SHUFFLE (BUTTON_HOME | BUTTON_PREV)
-#define FLIPIT_SOLVE (BUTTON_HOME | BUTTON_NEXT)
-#define FLIPIT_STEP_BY_STEP (BUTTON_HOME | BUTTON_PLAY)
-#define FLIPIT_TOGGLE BUTTON_PLAY
-
-#elif CONFIG_KEYPAD == XDUOO_X20_PAD
+#elif CONFIG_KEYPAD == XDUOO_X3_PAD || CONFIG_KEYPAD == XDUOO_X3II_PAD || CONFIG_KEYPAD == XDUOO_X20_PAD
#define FLIPIT_LEFT BUTTON_PREV
#define FLIPIT_RIGHT BUTTON_NEXT
@@ -484,7 +460,7 @@
#define FLIPIT_STEP_BY_STEP (BUTTON_HOME | BUTTON_PLAY)
#define FLIPIT_TOGGLE BUTTON_PLAY
-#elif CONFIG_KEYPAD == IHIFI_770_PAD
+#elif CONFIG_KEYPAD == IHIFI_770_PAD || CONFIG_KEYPAD == IHIFI_800_PAD
#define FLIPIT_LEFT BUTTON_HOME
#define FLIPIT_RIGHT BUTTON_VOL_DOWN
@@ -496,16 +472,16 @@
#define FLIPIT_STEP_BY_STEP (BUTTON_POWER | BUTTON_PLAY)
#define FLIPIT_TOGGLE BUTTON_PLAY
-#elif CONFIG_KEYPAD == IHIFI_800_PAD
+#elif CONFIG_KEYPAD == EROSQ_PAD
-#define FLIPIT_LEFT BUTTON_HOME
-#define FLIPIT_RIGHT BUTTON_VOL_DOWN
+#define FLIPIT_LEFT BUTTON_SCROLL_BACK
+#define FLIPIT_RIGHT BUTTON_SCROLL_FWD
#define FLIPIT_UP BUTTON_PREV
#define FLIPIT_DOWN BUTTON_NEXT
#define FLIPIT_QUIT BUTTON_POWER
-#define FLIPIT_SHUFFLE (BUTTON_POWER | BUTTON_PREV)
-#define FLIPIT_SOLVE (BUTTON_POWER | BUTTON_NEXT)
-#define FLIPIT_STEP_BY_STEP (BUTTON_POWER | BUTTON_PLAY)
+#define FLIPIT_SHUFFLE BUTTON_MENU
+#define FLIPIT_SOLVE BUTTON_VOL_DOWN
+#define FLIPIT_STEP_BY_STEP BUTTON_VOL_UP
#define FLIPIT_TOGGLE BUTTON_PLAY
#else
@@ -562,8 +538,8 @@ static int cursor_pos, moves;
/* draw a spot at the coordinates (x,y), range of p is 0-19 */
static void draw_spot(int p)
{
- rb->lcd_bitmap_part( flipit_tokens, 0, spots[p] * TK_HEIGHT,
- STRIDE(SCREEN_MAIN, BMPWIDTH_flipit_tokens,
+ rb->lcd_bitmap_part( flipit_tokens, 0, spots[p] * TK_HEIGHT,
+ STRIDE(SCREEN_MAIN, BMPWIDTH_flipit_tokens,
BMPHEIGHT_flipit_tokens),
GRID_LEFT + (p%5) * (TK_WIDTH+TK_SPACE),
GRID_TOP + (p/5) * (TK_HEIGHT+TK_SPACE),
@@ -571,7 +547,7 @@ static void draw_spot(int p)
}
/* draw the cursor at the current cursor position */
-static void draw_cursor(void)
+static void draw_cursor(void)
{
#ifdef HAVE_LCD_COLOR
rb->lcd_bitmap_transparent( flipit_cursor,
@@ -612,7 +588,7 @@ static inline void clear_cursor(void)
}
/* check if the puzzle is finished */
-static bool flipit_finished(void)
+static bool flipit_finished(void)
{
int i;
for (i=0; i<20; i++)
@@ -653,7 +629,7 @@ static void flipit_toggle(void)
}
/* move the cursor in any direction */
-static void move_cursor(int x, int y)
+static void move_cursor(int x, int y)
{
if (!(flipit_finished())) {
clear_cursor();
@@ -665,7 +641,7 @@ static void move_cursor(int x, int y)
}
/* initialize the board */
-static void flipit_init(void)
+static void flipit_init(void)
{
int i;
@@ -690,7 +666,7 @@ static void flipit_init(void)
}
/* the main game loop */
-static bool flipit_loop(void)
+static bool flipit_loop(void)
{
int i;
int button;
@@ -775,7 +751,7 @@ static bool flipit_loop(void)
/*move cursor though the entire field*/
#ifdef FLIPIT_SCROLLWHEEL
case FLIPIT_PREV:
- case FLIPIT_PREV|BUTTON_REPEAT:
+ case FLIPIT_PREV|BUTTON_REPEAT:
if ((cursor_pos)%5 == 0) {
move_cursor(-1, -1);
}
diff --git a/apps/plugins/fractals/fractal.h b/apps/plugins/fractals/fractal.h
index 45de45c5cd..d4d013550e 100644
--- a/apps/plugins/fractals/fractal.h
+++ b/apps/plugins/fractals/fractal.h
@@ -458,19 +458,7 @@
#define FRACTAL_PRECISION_DEC (BUTTON_PLAY | BUTTON_PREV)
#define FRACTAL_RESET (BUTTON_HOME | BUTTON_POWER)
-#elif CONFIG_KEYPAD == XDUOO_X3II_PAD
-#define FRACTAL_QUIT BUTTON_POWER
-#define FRACTAL_UP BUTTON_HOME
-#define FRACTAL_DOWN BUTTON_OPTION
-#define FRACTAL_LEFT BUTTON_PREV
-#define FRACTAL_RIGHT BUTTON_NEXT
-#define FRACTAL_ZOOM_IN BUTTON_VOL_UP
-#define FRACTAL_ZOOM_OUT BUTTON_VOL_DOWN
-#define FRACTAL_PRECISION_INC (BUTTON_PLAY | BUTTON_NEXT)
-#define FRACTAL_PRECISION_DEC (BUTTON_PLAY | BUTTON_PREV)
-#define FRACTAL_RESET (BUTTON_HOME | BUTTON_POWER)
-
-#elif CONFIG_KEYPAD == XDUOO_X20_PAD
+#elif CONFIG_KEYPAD == XDUOO_X3II_PAD || CONFIG_KEYPAD == XDUOO_X20_PAD
#define FRACTAL_QUIT BUTTON_POWER
#define FRACTAL_UP BUTTON_HOME
#define FRACTAL_DOWN BUTTON_OPTION
@@ -494,7 +482,7 @@
#define FRACTAL_PRECISION_DEC (BUTTON_PLAY | BUTTON_PREV)
#define FRACTAL_RESET (BUTTON_HOME | BUTTON_POWER)
-#elif CONFIG_KEYPAD == IHIFI_770_PAD
+#elif CONFIG_KEYPAD == IHIFI_770_PAD || CONFIG_KEYPAD == IHIFI_800_PAD
#define FRACTAL_QUIT BUTTON_POWER
#define FRACTAL_UP BUTTON_PREV
#define FRACTAL_DOWN BUTTON_NEXT
@@ -506,17 +494,17 @@
#define FRACTAL_PRECISION_DEC (BUTTON_POWER | BUTTON_PREV)
#define FRACTAL_RESET (BUTTON_POWER | BUTTON_HOME)
-#elif CONFIG_KEYPAD == IHIFI_800_PAD
+#elif CONFIG_KEYPAD == EROSQ_PAD
#define FRACTAL_QUIT BUTTON_POWER
#define FRACTAL_UP BUTTON_PREV
#define FRACTAL_DOWN BUTTON_NEXT
-#define FRACTAL_LEFT BUTTON_HOME
-#define FRACTAL_RIGHT BUTTON_VOL_DOWN
-#define FRACTAL_ZOOM_IN (BUTTON_POWER | BUTTON_VOL_UP)
-#define FRACTAL_ZOOM_OUT (BUTTON_POWER | BUTTON_VOL_DOWN)
-#define FRACTAL_PRECISION_INC (BUTTON_POWER | BUTTON_NEXT)
-#define FRACTAL_PRECISION_DEC (BUTTON_POWER | BUTTON_PREV)
-#define FRACTAL_RESET (BUTTON_POWER | BUTTON_HOME)
+#define FRACTAL_LEFT BUTTON_SCROLL_BACK
+#define FRACTAL_RIGHT BUTTON_SCROLL_FWD
+#define FRACTAL_ZOOM_IN BUTTON_VOL_UP
+#define FRACTAL_ZOOM_OUT BUTTON_VOL_DOWN
+#define FRACTAL_PRECISION_INC BUTTON_MENU
+#define FRACTAL_PRECISION_DEC BUTTON_BACK
+#define FRACTAL_RESET BUTTON_PLAY
#else
#error No keymap defined!
@@ -555,4 +543,3 @@
#endif
#endif
-
diff --git a/apps/plugins/goban/goban.h b/apps/plugins/goban/goban.h
index c6a10e3944..db70216464 100644
--- a/apps/plugins/goban/goban.h
+++ b/apps/plugins/goban/goban.h
@@ -443,19 +443,7 @@
#define GBN_BUTTON_CONTEXT BUTTON_PLAY | BUTTON_REPEAT
#define GBN_BUTTON_NEXT_VAR BUTTON_HOME | BUTTON_PWRALT
-#elif (CONFIG_KEYPAD == XDUOO_X3II_PAD)
-#define GBN_BUTTON_UP BUTTON_HOME
-#define GBN_BUTTON_DOWN BUTTON_OPTION
-#define GBN_BUTTON_LEFT BUTTON_PREV
-#define GBN_BUTTON_RIGHT BUTTON_NEXT
-#define GBN_BUTTON_RETREAT BUTTON_VOL_DOWN
-#define GBN_BUTTON_ADVANCE BUTTON_VOL_UP
-#define GBN_BUTTON_MENU BUTTON_POWER
-#define GBN_BUTTON_PLAY BUTTON_PLAY | BUTTON_REL
-#define GBN_BUTTON_CONTEXT BUTTON_PLAY | BUTTON_REPEAT
-#define GBN_BUTTON_NEXT_VAR BUTTON_HOME | BUTTON_POWER
-
-#elif (CONFIG_KEYPAD == XDUOO_X20_PAD)
+#elif (CONFIG_KEYPAD == XDUOO_X3II_PAD) || (CONFIG_KEYPAD == XDUOO_X20_PAD)
#define GBN_BUTTON_UP BUTTON_HOME
#define GBN_BUTTON_DOWN BUTTON_OPTION
#define GBN_BUTTON_LEFT BUTTON_PREV
@@ -479,7 +467,7 @@
#define GBN_BUTTON_CONTEXT BUTTON_PLAY | BUTTON_REPEAT
#define GBN_BUTTON_NEXT_VAR BUTTON_HOME | BUTTON_POWER
-#elif (CONFIG_KEYPAD == IHIFI_770_PAD)
+#elif (CONFIG_KEYPAD == IHIFI_770_PAD) || (CONFIG_KEYPAD == IHIFI_800_PAD)
#define GBN_BUTTON_UP BUTTON_PREV
#define GBN_BUTTON_DOWN BUTTON_NEXT
@@ -492,18 +480,17 @@
#define GBN_BUTTON_CONTEXT BUTTON_PLAY | BUTTON_REPEAT
#define GBN_BUTTON_NEXT_VAR BUTTON_POWER | BUTTON_HOME
-#elif (CONFIG_KEYPAD == IHIFI_800_PAD)
-
+#elif (CONFIG_KEYPAD == EROSQ_PAD)
#define GBN_BUTTON_UP BUTTON_PREV
#define GBN_BUTTON_DOWN BUTTON_NEXT
-#define GBN_BUTTON_LEFT BUTTON_HOME
-#define GBN_BUTTON_RIGHT BUTTON_VOL_DOWN
-#define GBN_BUTTON_RETREAT BUTTON_POWER | BUTTON_VOL_DOWN
-#define GBN_BUTTON_ADVANCE BUTTON_POWER | BUTTON_VOL_UP
-#define GBN_BUTTON_MENU BUTTON_POWER
-#define GBN_BUTTON_PLAY BUTTON_PLAY | BUTTON_REL
-#define GBN_BUTTON_CONTEXT BUTTON_PLAY | BUTTON_REPEAT
-#define GBN_BUTTON_NEXT_VAR BUTTON_POWER | BUTTON_HOME
+#define GBN_BUTTON_LEFT BUTTON_SCROLL_BACK
+#define GBN_BUTTON_RIGHT BUTTON_SCROLL_FWD
+#define GBN_BUTTON_RETREAT BUTTON_VOL_DOWN
+#define GBN_BUTTON_ADVANCE BUTTON_VOL_UP
+#define GBN_BUTTON_MENU BUTTON_MENU
+#define GBN_BUTTON_PLAY BUTTON_PLAY
+#define GBN_BUTTON_CONTEXT BUTTON_MENU | BUTTON_REPEAT
+#define GBN_BUTTON_NEXT_VAR BUTTON_BACK
#else
#error Unsupported keypad
diff --git a/apps/plugins/imageviewer/imageviewer_button.h b/apps/plugins/imageviewer/imageviewer_button.h
index e637a09ca9..4559a7b3a3 100644
--- a/apps/plugins/imageviewer/imageviewer_button.h
+++ b/apps/plugins/imageviewer/imageviewer_button.h
@@ -476,22 +476,7 @@
#define IMGVIEW_MENU BUTTON_POWER
#define IMGVIEW_SLIDE_SHOW (BUTTON_HOME|BUTTON_PWRALT)
-#elif CONFIG_KEYPAD == XDUOO_X3II_PAD
-#define IMGVIEW_ZOOM_PRE BUTTON_PLAY
-#define IMGVIEW_ZOOM_IN (BUTTON_PLAY | BUTTON_REL)
-#define IMGVIEW_ZOOM_OUT (BUTTON_PLAY | BUTTON_REPEAT)
-#define IMGVIEW_UP BUTTON_HOME
-#define IMGVIEW_DOWN BUTTON_OPTION
-#define IMGVIEW_LEFT BUTTON_PREV
-#define IMGVIEW_RIGHT BUTTON_NEXT
-#define IMGVIEW_NEXT BUTTON_VOL_UP
-#define IMGVIEW_NEXT_REPEAT (BUTTON_VOL_UP|BUTTON_REPEAT)
-#define IMGVIEW_PREVIOUS BUTTON_VOL_DOWN
-#define IMGVIEW_PREVIOUS_REPEAT (BUTTON_VOL_DOWN|BUTTON_REPEAT)
-#define IMGVIEW_MENU BUTTON_POWER
-#define IMGVIEW_SLIDE_SHOW (BUTTON_HOME|BUTTON_POWER)
-
-#elif CONFIG_KEYPAD == XDUOO_X20_PAD
+#elif CONFIG_KEYPAD == XDUOO_X3II_PAD || CONFIG_KEYPAD == XDUOO_X20_PAD
#define IMGVIEW_ZOOM_PRE BUTTON_PLAY
#define IMGVIEW_ZOOM_IN (BUTTON_PLAY | BUTTON_REL)
#define IMGVIEW_ZOOM_OUT (BUTTON_PLAY | BUTTON_REPEAT)
@@ -521,7 +506,7 @@
#define IMGVIEW_MENU BUTTON_POWER
#define IMGVIEW_SLIDE_SHOW (BUTTON_HOME|BUTTON_POWER)
-#elif CONFIG_KEYPAD == IHIFI_770_PAD
+#elif CONFIG_KEYPAD == IHIFI_770_PAD || CONFIG_KEYPAD == IHIFI_800_PAD
#define IMGVIEW_ZOOM_PRE BUTTON_PLAY
#define IMGVIEW_ZOOM_IN (BUTTON_PLAY | BUTTON_REL)
#define IMGVIEW_ZOOM_OUT (BUTTON_PLAY | BUTTON_REPEAT)
@@ -536,20 +521,20 @@
#define IMGVIEW_MENU BUTTON_POWER
#define IMGVIEW_SLIDE_SHOW (BUTTON_HOME|BUTTON_POWER)
-#elif CONFIG_KEYPAD == IHIFI_800_PAD
+#elif CONFIG_KEYPAD == EROSQ_PAD
#define IMGVIEW_ZOOM_PRE BUTTON_PLAY
#define IMGVIEW_ZOOM_IN (BUTTON_PLAY | BUTTON_REL)
#define IMGVIEW_ZOOM_OUT (BUTTON_PLAY | BUTTON_REPEAT)
#define IMGVIEW_UP BUTTON_PREV
#define IMGVIEW_DOWN BUTTON_NEXT
-#define IMGVIEW_LEFT BUTTON_HOME
-#define IMGVIEW_RIGHT (BUTTON_PLAY|BUTTON_POWER)
+#define IMGVIEW_LEFT BUTTON_SCROLL_BACK
+#define IMGVIEW_RIGHT BUTTON_SCROLL_FWD
#define IMGVIEW_NEXT BUTTON_VOL_UP
#define IMGVIEW_NEXT_REPEAT (BUTTON_VOL_UP|BUTTON_REPEAT)
#define IMGVIEW_PREVIOUS BUTTON_VOL_DOWN
#define IMGVIEW_PREVIOUS_REPEAT (BUTTON_VOL_DOWN|BUTTON_REPEAT)
-#define IMGVIEW_MENU BUTTON_POWER
-#define IMGVIEW_SLIDE_SHOW (BUTTON_HOME|BUTTON_POWER)
+#define IMGVIEW_MENU BUTTON_MENU
+#define IMGVIEW_SLIDE_SHOW BUTTON_BACK
#else
#error No keymap defined!
diff --git a/apps/plugins/invadrox.c b/apps/plugins/invadrox.c
index 5e3cb12163..57d6fabe8d 100644
--- a/apps/plugins/invadrox.c
+++ b/apps/plugins/invadrox.c
@@ -268,14 +268,7 @@ CONFIG_KEYPAD == MROBE500_PAD
#define QUIT BUTTON_POWER
#define FIRE BUTTON_MENU
-#elif CONFIG_KEYPAD == XDUOO_X3II_PAD
-
-#define QUIT BUTTON_POWER
-#define LEFT BUTTON_HOME
-#define RIGHT BUTTON_VOL_DOWN
-#define FIRE BUTTON_VOL_UP
-
-#elif CONFIG_KEYPAD == XDUOO_X20_PAD
+#elif CONFIG_KEYPAD == XDUOO_X3II_PAD || CONFIG_KEYPAD == XDUOO_X20_PAD
#define QUIT BUTTON_POWER
#define LEFT BUTTON_HOME
@@ -289,19 +282,19 @@ CONFIG_KEYPAD == MROBE500_PAD
#define RIGHT BUTTON_VOL_DOWN
#define FIRE BUTTON_VOL_UP
-#elif CONFIG_KEYPAD == IHIFI_770_PAD
+#elif CONFIG_KEYPAD == IHIFI_770_PAD || CONFIG_KEYPAD == IHIFI_800_PAD
#define QUIT BUTTON_POWER
#define LEFT BUTTON_HOME
#define RIGHT BUTTON_VOL_DOWN
#define FIRE BUTTON_VOL_UP
-#elif CONFIG_KEYPAD == IHIFI_800_PAD
+#elif CONFIG_KEYPAD == EROSQ_PAD
#define QUIT BUTTON_POWER
-#define LEFT BUTTON_HOME
-#define RIGHT BUTTON_VOL_DOWN
-#define FIRE BUTTON_VOL_UP
+#define LEFT BUTTON_SCROLL_BACK
+#define RIGHT BUTTON_SCROLL_FWD
+#define FIRE BUTTON_PLAY
#else
#error INVADROX: Unsupported keypad
@@ -829,8 +822,8 @@ static void draw_number(int x, int y, int num, int digits)
d = num % 10;
num = num / 10;
rb->lcd_bitmap_part(invadrox_numbers, d * NUMBERS_WIDTH, 0,
- STRIDE( SCREEN_MAIN,
- BMPWIDTH_invadrox_numbers,
+ STRIDE( SCREEN_MAIN,
+ BMPWIDTH_invadrox_numbers,
BMPHEIGHT_invadrox_numbers),
x + i * (NUMBERS_WIDTH + NUM_SPACING), y,
NUMBERS_WIDTH, FONT_HEIGHT);
@@ -861,17 +854,17 @@ static void draw_lives(void)
int i;
/* Lives num */
rb->lcd_bitmap_part(invadrox_numbers, lives * NUMBERS_WIDTH, 0,
- STRIDE( SCREEN_MAIN,
- BMPWIDTH_invadrox_numbers,
- BMPHEIGHT_invadrox_numbers),
+ STRIDE( SCREEN_MAIN,
+ BMPWIDTH_invadrox_numbers,
+ BMPHEIGHT_invadrox_numbers),
PLAYFIELD_X + LIVES_X, PLAYFIELD_Y + 2,
NUMBERS_WIDTH, FONT_HEIGHT);
/* Ships */
for (i = 0; i < (lives - 1); i++) {
- rb->lcd_bitmap_part(invadrox_ships, 0, 0,
- STRIDE( SCREEN_MAIN,
- BMPWIDTH_invadrox_ships,
+ rb->lcd_bitmap_part(invadrox_ships, 0, 0,
+ STRIDE( SCREEN_MAIN,
+ BMPWIDTH_invadrox_ships,
BMPHEIGHT_invadrox_ships),
PLAYFIELD_X + LIVES_X + SHIP_WIDTH + i * (SHIP_WIDTH + NUM_SPACING),
PLAYFIELD_Y + 1, SHIP_WIDTH, SHIP_HEIGHT);
@@ -893,11 +886,11 @@ static inline void draw_aliens(void)
int i;
for (i = 0; i < 5 * ALIENS; i++) {
- rb->lcd_bitmap_part(invadrox_aliens, aliens[i].x & 1 ? ALIEN_WIDTH : 0,
+ rb->lcd_bitmap_part(invadrox_aliens, aliens[i].x & 1 ? ALIEN_WIDTH : 0,
aliens[i].type * ALIEN_HEIGHT,
- STRIDE( SCREEN_MAIN,
- BMPWIDTH_invadrox_aliens,
- BMPHEIGHT_invadrox_aliens),
+ STRIDE( SCREEN_MAIN,
+ BMPWIDTH_invadrox_aliens,
+ BMPHEIGHT_invadrox_aliens),
PLAYFIELD_X + LIVES_X + aliens[i].x * ALIEN_SPEED,
ALIEN_START_Y + aliens[i].y * ALIEN_HEIGHT,
ALIEN_WIDTH, ALIEN_HEIGHT);
@@ -1035,11 +1028,11 @@ static bool move_aliens(void)
x = PLAYFIELD_X + LIVES_X + aliens[curr_alien].x * ALIEN_SPEED;
y = ALIEN_START_Y + aliens[curr_alien].y * ALIEN_HEIGHT;
rb->lcd_bitmap_part(invadrox_aliens,
- aliens[curr_alien].x & 1 ? ALIEN_WIDTH : 0,
+ aliens[curr_alien].x & 1 ? ALIEN_WIDTH : 0,
aliens[curr_alien].type * ALIEN_HEIGHT,
- STRIDE( SCREEN_MAIN,
+ STRIDE( SCREEN_MAIN,
BMPWIDTH_invadrox_aliens,
- BMPHEIGHT_invadrox_aliens),
+ BMPHEIGHT_invadrox_aliens),
x, y, ALIEN_WIDTH, ALIEN_HEIGHT);
if (!next_alien()) {
@@ -1068,9 +1061,9 @@ static inline void draw_ship(void)
/* Draw ship */
rb->lcd_bitmap_part(invadrox_ships, 0, ship_frame * SHIP_HEIGHT,
- STRIDE( SCREEN_MAIN,
+ STRIDE( SCREEN_MAIN,
BMPWIDTH_invadrox_ships,
- BMPHEIGHT_invadrox_ships),
+ BMPHEIGHT_invadrox_ships),
ship_x, SHIP_Y, SHIP_WIDTH, SHIP_HEIGHT);
if (ship_hit) {
/* Alternate between frame 1 and 2 during hit */
@@ -1095,7 +1088,7 @@ static inline void fire_alpha(int xc, int yc, unsigned color)
rb->lcd_set_foreground(color);
rb->lcd_set_drawmode(DRMODE_FG);
-
+
rb->lcd_mono_bitmap(invadrox_fire, xc - (FIRE_WIDTH/2), yc, FIRE_WIDTH, FIRE_HEIGHT);
rb->lcd_set_foreground(LCD_BLACK);
@@ -1311,9 +1304,9 @@ static inline void draw_bomb(int i)
{
rb->lcd_bitmap_part(invadrox_bombs, bombs[i].type * BOMB_WIDTH,
bombs[i].frame * BOMB_HEIGHT,
- STRIDE( SCREEN_MAIN,
+ STRIDE( SCREEN_MAIN,
BMPWIDTH_invadrox_bombs,
- BMPHEIGHT_invadrox_bombs),
+ BMPHEIGHT_invadrox_bombs),
bombs[i].x, bombs[i].y,
BOMB_WIDTH, BOMB_HEIGHT);
/* Advance frame */
@@ -1415,9 +1408,9 @@ static void move_bombs(void)
bombs[i].state = S_EXPLODE * 4;
bombs[i].target = TARGET_SHIP;
rb->lcd_bitmap_part(invadrox_ships, 0, 1 * SHIP_HEIGHT,
- STRIDE( SCREEN_MAIN,
+ STRIDE( SCREEN_MAIN,
BMPWIDTH_invadrox_ships,
- BMPHEIGHT_invadrox_ships),
+ BMPHEIGHT_invadrox_ships),
ship_x, SHIP_Y,
SHIP_WIDTH, SHIP_HEIGHT);
break;
diff --git a/apps/plugins/jewels.c b/apps/plugins/jewels.c
index 64a15ff4fc..b58c47dd12 100644
--- a/apps/plugins/jewels.c
+++ b/apps/plugins/jewels.c
@@ -347,27 +347,7 @@ CONFIG_KEYPAD == MROBE500_PAD
#define JEWELS_CANCEL BUTTON_POWER
#define HK_CANCEL "Power"
-#elif CONFIG_KEYPAD == XDUOO_X3_PAD
-#define JEWELS_UP BUTTON_HOME
-#define JEWELS_DOWN BUTTON_OPTION
-#define JEWELS_LEFT BUTTON_PREV
-#define JEWELS_RIGHT BUTTON_NEXT
-#define JEWELS_SELECT BUTTON_PLAY
-#define JEWELS_CANCEL BUTTON_POWER
-#define HK_SELECT "PLAY"
-#define HK_CANCEL "POWER"
-
-#elif CONFIG_KEYPAD == XDUOO_X3II_PAD
-#define JEWELS_UP BUTTON_HOME
-#define JEWELS_DOWN BUTTON_OPTION
-#define JEWELS_LEFT BUTTON_PREV
-#define JEWELS_RIGHT BUTTON_NEXT
-#define JEWELS_SELECT BUTTON_PLAY
-#define JEWELS_CANCEL BUTTON_POWER
-#define HK_SELECT "PLAY"
-#define HK_CANCEL "POWER"
-
-#elif CONFIG_KEYPAD == XDUOO_X20_PAD
+#elif CONFIG_KEYPAD == XDUOO_X3_PAD || CONFIG_KEYPAD == XDUOO_X3II_PAD || CONFIG_KEYPAD == XDUOO_X20_PAD
#define JEWELS_UP BUTTON_HOME
#define JEWELS_DOWN BUTTON_OPTION
#define JEWELS_LEFT BUTTON_PREV
@@ -387,7 +367,7 @@ CONFIG_KEYPAD == MROBE500_PAD
#define HK_SELECT "PLAY"
#define HK_CANCEL "POWER"
-#elif CONFIG_KEYPAD == IHIFI_770_PAD
+#elif CONFIG_KEYPAD == IHIFI_770_PAD || CONFIG_KEYPAD == IHIFI_800_PAD
#define JEWELS_UP BUTTON_PREV
#define JEWELS_DOWN BUTTON_NEXT
#define JEWELS_LEFT BUTTON_HOME
@@ -397,15 +377,16 @@ CONFIG_KEYPAD == MROBE500_PAD
#define HK_SELECT "PLAY"
#define HK_CANCEL "POWER"
-#elif CONFIG_KEYPAD == IHIFI_800_PAD
+#elif CONFIG_KEYPAD == EROSQ_PAD
#define JEWELS_UP BUTTON_PREV
#define JEWELS_DOWN BUTTON_NEXT
-#define JEWELS_LEFT BUTTON_HOME
-#define JEWELS_RIGHT BUTTON_VOL_DOWN
+#define JEWELS_LEFT BUTTON_SCROLL_BACK
+#define JEWELS_RIGHT BUTTON_SCROLL_FWD
#define JEWELS_SELECT BUTTON_PLAY
-#define JEWELS_CANCEL BUTTON_POWER
+#define JEWELS_CANCEL BUTTON_BACK
#define HK_SELECT "PLAY"
-#define HK_CANCEL "POWER"
+#define HK_CANCEL "BACK"
+
#else
#error No keymap defined!
@@ -662,14 +643,14 @@ static void jewels_drawboard(struct game_context* bj) {
TILE_WIDTH, TILE_HEIGHT);
rb->lcd_bitmap_transparent_part(jewels,
0, TILE_HEIGHT*(bj->playboard[i+1][j].type),
- STRIDE( SCREEN_MAIN,
- BMPWIDTH_jewels, BMPHEIGHT_jewels),
+ STRIDE( SCREEN_MAIN,
+ BMPWIDTH_jewels, BMPHEIGHT_jewels),
j*TILE_WIDTH, i*TILE_HEIGHT+YOFS,
TILE_WIDTH, TILE_HEIGHT);
#else
rb->lcd_bitmap_part(jewels,
0, TILE_HEIGHT*(bj->playboard[i+1][j].type),
- STRIDE( SCREEN_MAIN,
+ STRIDE( SCREEN_MAIN,
BMPWIDTH_jewels, BMPHEIGHT_jewels),
j*TILE_WIDTH, i*TILE_HEIGHT+YOFS,
TILE_WIDTH, TILE_HEIGHT);
@@ -685,7 +666,7 @@ static void jewels_drawboard(struct game_context* bj) {
rb->lcd_hline(BJ_WIDTH*TILE_WIDTH, LCD_WIDTH-1, 18);
rb->lcd_hline(BJ_WIDTH*TILE_WIDTH, LCD_WIDTH-1, LCD_HEIGHT-10);
-
+
/* draw progress bar */
#ifdef HAVE_LCD_COLOR
rb->lcd_set_foreground(LCD_RGBPACK(104, 63, 63));
@@ -708,7 +689,7 @@ static void jewels_drawboard(struct game_context* bj) {
(LCD_WIDTH-BJ_WIDTH*TILE_WIDTH)/2,
((LCD_HEIGHT-10)-18)*tempscore/size+1);
#endif
-
+
/* print text */
rb->lcd_getstringsize(title, &w, &h);
rb->lcd_putsxy(LCD_WIDTH-(LCD_WIDTH-BJ_WIDTH*TILE_WIDTH)/2-w/2, 1, title);
@@ -730,7 +711,7 @@ static void jewels_drawboard(struct game_context* bj) {
rb->lcd_hline(0, LCD_WIDTH-1, 8*TILE_HEIGHT+YOFS);
rb->lcd_hline(0, LCD_WIDTH-1, LCD_HEIGHT-14);
rb->lcd_vline(LCD_WIDTH/2, LCD_HEIGHT-14, LCD_HEIGHT-1);
-
+
/* draw progress bar */
#ifdef HAVE_LCD_COLOR
rb->lcd_set_foreground(LCD_RGBPACK(104, 63, 63));
@@ -751,10 +732,10 @@ static void jewels_drawboard(struct game_context* bj) {
LCD_WIDTH*tempscore/size+1,
(LCD_HEIGHT-14-(8*TILE_HEIGHT+YOFS))/2);
#endif
-
+
/* print text */
rb->lcd_putsxyf(1, LCD_HEIGHT-10, "%s %d", title, bj->level);
-
+
if (bj->type == GAME_TYPE_NORMAL) {
rb->snprintf(str, 6, "%d", (bj->level-1)*LEVEL_PTS+bj->score);
rb->lcd_getstringsize(str, &w, &h);
@@ -796,7 +777,7 @@ static void jewels_drawboard(struct game_context* bj) {
/* print text */
rb->lcd_putsxyf(1, LCD_HEIGHT-(LCD_HEIGHT-(8*TILE_HEIGHT+YOFS))/2-3,"%s %d",
title, bj->level);
-
+
if (bj->type == GAME_TYPE_NORMAL) {
rb->snprintf(str, 6, "%d", (bj->level-1)*LEVEL_PTS+bj->score);
rb->lcd_getstringsize(str, &w, &h);
@@ -881,8 +862,8 @@ static void jewels_putjewels(struct game_context* bj){
#ifdef HAVE_LCD_COLOR
rb->lcd_bitmap_transparent_part(jewels, 0,
TILE_HEIGHT*(bj->playboard[i][j].type),
- STRIDE( SCREEN_MAIN,
- BMPWIDTH_jewels,
+ STRIDE( SCREEN_MAIN,
+ BMPWIDTH_jewels,
BMPHEIGHT_jewels),
j*TILE_WIDTH,
(i-1)*TILE_HEIGHT+YOFS+
@@ -891,8 +872,8 @@ static void jewels_putjewels(struct game_context* bj){
#else
rb->lcd_bitmap_part(jewels, 0,
TILE_HEIGHT*(bj->playboard[i][j].type),
- STRIDE( SCREEN_MAIN,
- BMPWIDTH_jewels,
+ STRIDE( SCREEN_MAIN,
+ BMPWIDTH_jewels,
BMPHEIGHT_jewels),
j*TILE_WIDTH,
(i-1)*TILE_HEIGHT+YOFS+
@@ -1113,7 +1094,7 @@ static unsigned int jewels_swapjewels(struct game_context* bj,
rb->lcd_bitmap_transparent_part(jewels,
0, TILE_HEIGHT*(bj->playboard
[y+1+vertmod][x+horzmod].type),
- STRIDE( SCREEN_MAIN,
+ STRIDE( SCREEN_MAIN,
BMPWIDTH_jewels, BMPHEIGHT_jewels),
(x+horzmod)*TILE_WIDTH-horzmod*
((((movelen<<10)*k)/8)>>10),
@@ -1122,7 +1103,7 @@ static unsigned int jewels_swapjewels(struct game_context* bj,
TILE_WIDTH, TILE_HEIGHT);
rb->lcd_bitmap_transparent_part(jewels,
0, TILE_HEIGHT*(bj->playboard[y+1][x].type),
- STRIDE( SCREEN_MAIN,
+ STRIDE( SCREEN_MAIN,
BMPWIDTH_jewels, BMPHEIGHT_jewels),
x*TILE_WIDTH+horzmod*
((((movelen<<10)*k)/8)>>10),
@@ -1133,7 +1114,7 @@ static unsigned int jewels_swapjewels(struct game_context* bj,
rb->lcd_bitmap_part(jewels,
0, TILE_HEIGHT*(bj->playboard
[y+1+vertmod][x+horzmod].type),
- STRIDE( SCREEN_MAIN,
+ STRIDE( SCREEN_MAIN,
BMPWIDTH_jewels, BMPHEIGHT_jewels),
(x+horzmod)*TILE_WIDTH-horzmod*
((((movelen<<10)*k)/8)>>10),
@@ -1143,7 +1124,7 @@ static unsigned int jewels_swapjewels(struct game_context* bj,
rb->lcd_set_drawmode(DRMODE_FG);
rb->lcd_bitmap_part(jewels,
0, TILE_HEIGHT*(bj->playboard[y+1][x].type),
- STRIDE( SCREEN_MAIN,
+ STRIDE( SCREEN_MAIN,
BMPWIDTH_jewels, BMPHEIGHT_jewels),
x*TILE_WIDTH+horzmod*
((((movelen<<10)*k)/8)>>10),
@@ -1430,7 +1411,7 @@ static bool jewels_help(void)
{
static char *help_text[] = {
"Jewels", "", "Aim", "",
- "Swap", "pairs", "of", "jewels", "to", "form", "connected",
+ "Swap", "pairs", "of", "jewels", "to", "form", "connected",
"segments", "of", "three", "or", "more", "of", "the", "same",
"type.", "",
"The", "goal", "of", "the", "game", "is", "to", "score", "as", "many",
diff --git a/apps/plugins/lib/keymaps.h b/apps/plugins/lib/keymaps.h
index 2865f9cdd7..7c1b998400 100644
--- a/apps/plugins/lib/keymaps.h
+++ b/apps/plugins/lib/keymaps.h
@@ -215,23 +215,7 @@
#define BTN_FIRE BUTTON_MENU
#define BTN_PAUSE BUTTON_POWER
-#elif (CONFIG_KEYPAD == XDUOO_X3_PAD)
-#define BTN_UP BUTTON_VOL_UP
-#define BTN_DOWN BUTTON_VOL_DOWN
-#define BTN_LEFT BUTTON_PREV
-#define BTN_RIGHT BUTTON_NEXT
-#define BTN_FIRE BUTTON_PLAY
-#define BTN_PAUSE BUTTON_POWER
-
-#elif (CONFIG_KEYPAD == XDUOO_X3II_PAD)
-#define BTN_UP BUTTON_VOL_UP
-#define BTN_DOWN BUTTON_VOL_DOWN
-#define BTN_LEFT BUTTON_PREV
-#define BTN_RIGHT BUTTON_NEXT
-#define BTN_FIRE BUTTON_PLAY
-#define BTN_PAUSE BUTTON_POWER
-
-#elif (CONFIG_KEYPAD == XDUOO_X20_PAD)
+#elif (CONFIG_KEYPAD == XDUOO_X3_PAD) || (CONFIG_KEYPAD == XDUOO_X3II_PAD) || (CONFIG_KEYPAD == XDUOO_X20_PAD)
#define BTN_UP BUTTON_VOL_UP
#define BTN_DOWN BUTTON_VOL_DOWN
#define BTN_LEFT BUTTON_PREV
@@ -247,15 +231,15 @@
#define BTN_FIRE BUTTON_PLAY
#define BTN_PAUSE BUTTON_POWER
-#elif (CONFIG_KEYPAD == IHIFI_770_PAD)
+#elif (CONFIG_KEYPAD == EROSQ_PAD)
#define BTN_UP BUTTON_PREV
#define BTN_DOWN BUTTON_NEXT
-#define BTN_LEFT BUTTON_HOME
-#define BTN_RIGHT BUTTON_VOL_DOWN
+#define BTN_LEFT BUTTON_SCROLL_BACK
+#define BTN_RIGHT BUTTON_SCROLL_FWD
#define BTN_FIRE BUTTON_PLAY
#define BTN_PAUSE BUTTON_POWER
-#elif (CONFIG_KEYPAD == IHIFI_800_PAD)
+#elif (CONFIG_KEYPAD == IHIFI_770_PAD) || (CONFIG_KEYPAD == IHIFI_800_PAD)
#define BTN_UP BUTTON_PREV
#define BTN_DOWN BUTTON_NEXT
#define BTN_LEFT BUTTON_HOME
diff --git a/apps/plugins/lib/pluginlib_actions.c b/apps/plugins/lib/pluginlib_actions.c
index 480dc446cb..4d2a08cf47 100644
--- a/apps/plugins/lib/pluginlib_actions.c
+++ b/apps/plugins/lib/pluginlib_actions.c
@@ -68,7 +68,7 @@ const struct button_mapping pla_remote_ctx[] =
#endif /* HAVE_REMOTE_LCD */
/* these were taken from the bubbles plugin, so may need tweaking */
-const struct button_mapping pla_main_ctx[] =
+const struct button_mapping pla_main_ctx[] =
{
/* Touchscreens */
#ifdef HAVE_TOUCHSCREEN
@@ -242,6 +242,15 @@ const struct button_mapping pla_main_ctx[] =
{ PLA_DOWN_REPEAT, BUTTON_OPTION|BUTTON_REPEAT, BUTTON_NONE },
{ PLA_LEFT_REPEAT, BUTTON_PREV|BUTTON_REPEAT, BUTTON_NONE },
{ PLA_RIGHT_REPEAT, BUTTON_NEXT|BUTTON_REPEAT, BUTTON_NONE },
+#elif (CONFIG_KEYPAD == EROSQ_PAD)
+ { PLA_UP, BUTTON_NEXT, BUTTON_NONE },
+ { PLA_DOWN, BUTTON_PREV, BUTTON_NONE },
+ { PLA_LEFT, BUTTON_SCROLL_BACK, BUTTON_NONE },
+ { PLA_RIGHT, BUTTON_SCROLL_FWD, BUTTON_NONE },
+ { PLA_UP_REPEAT, BUTTON_NEXT|BUTTON_REPEAT, BUTTON_NONE },
+ { PLA_DOWN_REPEAT, BUTTON_PREV|BUTTON_REPEAT, BUTTON_NONE },
+// { PLA_LEFT_REPEAT, BUTTON_SCROLL_BACK|BUTTON_REPEAT, BUTTON_NONE },
+// { PLA_RIGHT_REPEAT, BUTTON_SCROLL_FWD|BUTTON_REPEAT, BUTTON_NONE },
#elif (CONFIG_KEYPAD == IHIFI_770_PAD)
{ PLA_UP, BUTTON_PREV, BUTTON_NONE },
{ PLA_DOWN, BUTTON_NEXT, BUTTON_NONE },
@@ -407,19 +416,19 @@ const struct button_mapping pla_main_ctx[] =
{PLA_SELECT, BUTTON_OK, BUTTON_NONE},
{PLA_SELECT_REL, BUTTON_OK|BUTTON_REL, BUTTON_OK },
{PLA_SELECT_REPEAT, BUTTON_OK|BUTTON_REPEAT, BUTTON_NONE},
-#elif (CONFIG_KEYPAD == MPIO_HD200_PAD)
+#elif (CONFIG_KEYPAD == MPIO_HD200_PAD)
{PLA_CANCEL, BUTTON_REC, BUTTON_NONE},
{PLA_EXIT, (BUTTON_REC|BUTTON_PLAY), BUTTON_NONE},
{PLA_SELECT, BUTTON_FUNC, BUTTON_NONE},
{PLA_SELECT_REL, BUTTON_FUNC|BUTTON_REL, BUTTON_FUNC},
{PLA_SELECT_REPEAT, BUTTON_FUNC|BUTTON_REPEAT, BUTTON_NONE},
-#elif (CONFIG_KEYPAD == MPIO_HD300_PAD)
+#elif (CONFIG_KEYPAD == MPIO_HD300_PAD)
{PLA_CANCEL, BUTTON_MENU, BUTTON_NONE},
{PLA_EXIT, BUTTON_MENU|BUTTON_REPEAT, BUTTON_NONE},
{PLA_SELECT, BUTTON_ENTER, BUTTON_NONE},
{PLA_SELECT_REL, BUTTON_ENTER|BUTTON_REL, BUTTON_ENTER},
{PLA_SELECT_REPEAT, BUTTON_ENTER|BUTTON_REPEAT, BUTTON_NONE},
-#elif (CONFIG_KEYPAD == RK27XX_GENERIC_PAD)
+#elif (CONFIG_KEYPAD == RK27XX_GENERIC_PAD)
{PLA_CANCEL, BUTTON_M, BUTTON_NONE},
{PLA_EXIT, BUTTON_M|BUTTON_REPEAT, BUTTON_NONE},
{PLA_SELECT, BUTTON_PLAY, BUTTON_NONE},
@@ -431,7 +440,7 @@ const struct button_mapping pla_main_ctx[] =
{PLA_SELECT, BUTTON_SELECT, BUTTON_NONE},
{PLA_SELECT_REL, BUTTON_SELECT|BUTTON_REL, BUTTON_SELECT},
{PLA_SELECT_REPEAT, BUTTON_SELECT|BUTTON_REPEAT, BUTTON_NONE},
-#elif (CONFIG_KEYPAD == AGPTEK_ROCKER_PAD)
+#elif (CONFIG_KEYPAD == AGPTEK_ROCKER_PAD)
{PLA_CANCEL, BUTTON_VOLUP, BUTTON_NONE},
{PLA_EXIT, BUTTON_POWER, BUTTON_NONE},
{PLA_SELECT, BUTTON_SELECT, BUTTON_NONE},
@@ -479,6 +488,12 @@ const struct button_mapping pla_main_ctx[] =
{PLA_SELECT, BUTTON_PLAY, BUTTON_NONE},
{PLA_SELECT_REL, BUTTON_PLAY|BUTTON_REL, BUTTON_PLAY},
{PLA_SELECT_REPEAT, BUTTON_PLAY|BUTTON_REPEAT, BUTTON_NONE},
+#elif (CONFIG_KEYPAD == EROSQ_PAD)
+ {PLA_CANCEL, BUTTON_BACK|BUTTON_REL, BUTTON_BACK},
+ {PLA_EXIT, BUTTON_POWER, BUTTON_NONE},
+ {PLA_SELECT, BUTTON_PLAY, BUTTON_NONE},
+ {PLA_SELECT_REL, BUTTON_PLAY|BUTTON_REL, BUTTON_PLAY},
+ {PLA_SELECT_REPEAT, BUTTON_PLAY|BUTTON_REPEAT, BUTTON_NONE},
#elif (CONFIG_KEYPAD == IHIFI_770_PAD)
{PLA_CANCEL, BUTTON_POWER|BUTTON_REL, BUTTON_POWER},
{PLA_EXIT, BUTTON_POWER|BUTTON_REPEAT, BUTTON_NONE},
@@ -501,7 +516,7 @@ const struct button_mapping pla_main_ctx[] =
static struct button_mapping **plugin_context_order;
static int plugin_context_count = 0;
-static int last_context = 0; /* index into plugin_context_order
+static int last_context = 0; /* index into plugin_context_order
of the last context returned */
static const struct button_mapping* get_context_map(int context)
diff --git a/apps/plugins/midi/midiplay.c b/apps/plugins/midi/midiplay.c
index e34cedde21..641991cfeb 100644
--- a/apps/plugins/midi/midiplay.c
+++ b/apps/plugins/midi/midiplay.c
@@ -293,23 +293,7 @@
#define MIDI_VOL_DOWN BUTTON_VOLDOWN
#define MIDI_PLAYPAUSE BUTTON_SELECT
-#elif CONFIG_KEYPAD == XDUOO_X3_PAD
-#define MIDI_QUIT BUTTON_POWER
-#define MIDI_FFWD BUTTON_NEXT
-#define MIDI_REWIND BUTTON_PREV
-#define MIDI_VOL_UP BUTTON_VOL_UP
-#define MIDI_VOL_DOWN BUTTON_VOL_DOWN
-#define MIDI_PLAYPAUSE BUTTON_PLAY
-
-#elif CONFIG_KEYPAD == XDUOO_X3II_PAD
-#define MIDI_QUIT BUTTON_POWER
-#define MIDI_FFWD BUTTON_NEXT
-#define MIDI_REWIND BUTTON_PREV
-#define MIDI_VOL_UP BUTTON_VOL_UP
-#define MIDI_VOL_DOWN BUTTON_VOL_DOWN
-#define MIDI_PLAYPAUSE BUTTON_PLAY
-
-#elif CONFIG_KEYPAD == XDUOO_X20_PAD
+#elif CONFIG_KEYPAD == XDUOO_X3_PAD || CONFIG_KEYPAD == XDUOO_X3II_PAD || CONFIG_KEYPAD == XDUOO_X20_PAD
#define MIDI_QUIT BUTTON_POWER
#define MIDI_FFWD BUTTON_NEXT
#define MIDI_REWIND BUTTON_PREV
@@ -325,15 +309,7 @@
#define MIDI_VOL_DOWN BUTTON_VOL_DOWN
#define MIDI_PLAYPAUSE BUTTON_PLAY
-#elif CONFIG_KEYPAD == IHIFI_770_PAD
-#define MIDI_QUIT BUTTON_POWER
-#define MIDI_FFWD BUTTON_VOL_DOWN
-#define MIDI_REWIND BUTTON_HOME
-#define MIDI_VOL_UP BUTTON_PREV
-#define MIDI_VOL_DOWN BUTTON_NEXT
-#define MIDI_PLAYPAUSE BUTTON_PLAY
-
-#elif CONFIG_KEYPAD == IHIFI_800_PAD
+#elif CONFIG_KEYPAD == IHIFI_770_PAD || CONFIG_KEYPAD == IHIFI_800_PAD
#define MIDI_QUIT BUTTON_POWER
#define MIDI_FFWD BUTTON_VOL_DOWN
#define MIDI_REWIND BUTTON_HOME
@@ -341,6 +317,14 @@
#define MIDI_VOL_DOWN BUTTON_NEXT
#define MIDI_PLAYPAUSE BUTTON_PLAY
+#elif CONFIG_KEYPAD == EROSQ_PAD
+#define MIDI_QUIT BUTTON_POWER
+#define MIDI_FFWD BUTTON_NEXT
+#define MIDI_REWIND BUTTON_PREV
+#define MIDI_VOL_UP BUTTON_VOL_UP
+#define MIDI_VOL_DOWN BUTTON_VOL_DOWN
+#define MIDI_PLAYPAUSE BUTTON_PLAY
+
#else
#error No keymap defined!
#endif
@@ -716,4 +700,3 @@ enum plugin_status plugin_start(const void* parameter)
return PLUGIN_ERROR;
return PLUGIN_OK;
}
-
diff --git a/apps/plugins/minesweeper.c b/apps/plugins/minesweeper.c
index 5872973a45..11c0e86619 100644
--- a/apps/plugins/minesweeper.c
+++ b/apps/plugins/minesweeper.c
@@ -382,20 +382,7 @@ CONFIG_KEYPAD == MROBE500_PAD
# define MINESWP_DISCOVER2 BUTTON_VOL_UP
# define MINESWP_INFO (BUTTON_PLAY | BUTTON_OPTION)
-#elif (CONFIG_KEYPAD == XDUOO_X3II_PAD)
-# define MINESWP_LEFT BUTTON_PREV
-# define MINESWP_RIGHT BUTTON_NEXT
-# define MINESWP_UP BUTTON_HOME
-# define MINESWP_DOWN BUTTON_OPTION
-# define MINESWP_QUIT BUTTON_POWER
-# define MINESWP_TOGGLE_PRE BUTTON_PLAY
-# define MINESWP_TOGGLE (BUTTON_PLAY | BUTTON_REL)
-# define MINESWP_TOGGLE2 BUTTON_VOL_DOWN
-# define MINESWP_DISCOVER (BUTTON_PLAY | BUTTON_REPEAT)
-# define MINESWP_DISCOVER2 BUTTON_VOL_UP
-# define MINESWP_INFO (BUTTON_PLAY | BUTTON_OPTION)
-
-#elif (CONFIG_KEYPAD == XDUOO_X20_PAD)
+#elif (CONFIG_KEYPAD == XDUOO_X3II_PAD) || (CONFIG_KEYPAD == XDUOO_X20_PAD)
# define MINESWP_LEFT BUTTON_PREV
# define MINESWP_RIGHT BUTTON_NEXT
# define MINESWP_UP BUTTON_HOME
@@ -421,7 +408,7 @@ CONFIG_KEYPAD == MROBE500_PAD
# define MINESWP_DISCOVER2 BUTTON_VOL_UP
# define MINESWP_INFO (BUTTON_PLAY | BUTTON_OPTION)
-#elif (CONFIG_KEYPAD == IHIFI_770_PAD)
+#elif (CONFIG_KEYPAD == IHIFI_770_PAD) || (CONFIG_KEYPAD == IHIFI_800_PAD)
# define MINESWP_LEFT BUTTON_HOME
# define MINESWP_RIGHT BUTTON_VOL_DOWN
# define MINESWP_UP BUTTON_PREV
@@ -434,18 +421,16 @@ CONFIG_KEYPAD == MROBE500_PAD
# define MINESWP_DISCOVER2 (BUTTON_POWER | BUTTON_VOL_DOWN)
# define MINESWP_INFO (BUTTON_POWER | BUTTON_HOME)
-#elif (CONFIG_KEYPAD == IHIFI_800_PAD)
-# define MINESWP_LEFT BUTTON_HOME
-# define MINESWP_RIGHT BUTTON_VOL_DOWN
+#elif (CONFIG_KEYPAD == EROSQ_PAD)
+# define MINESWP_LEFT BUTTON_SCROLL_BACK
+# define MINESWP_RIGHT BUTTON_SCROLL_FWD
# define MINESWP_UP BUTTON_PREV
# define MINESWP_DOWN BUTTON_NEXT
# define MINESWP_QUIT BUTTON_POWER
# define MINESWP_TOGGLE_PRE BUTTON_PLAY
-# define MINESWP_TOGGLE (BUTTON_POWER | BUTTON_PREV)
-# define MINESWP_TOGGLE2 (BUTTON_POWER | BUTTON_NEXT)
-# define MINESWP_DISCOVER (BUTTON_POWER | BUTTON_VOL_UP)
-# define MINESWP_DISCOVER2 (BUTTON_POWER | BUTTON_VOL_DOWN)
-# define MINESWP_INFO (BUTTON_POWER | BUTTON_HOME)
+# define MINESWP_TOGGLE (BUTTON_PLAY | BUTTON_REL)
+# define MINESWP_DISCOVER (BUTTON_PLAY | BUTTON_REPEAT)
+# define MINESWP_INFO BUTTON_VOL_UP
#else
#error No keymap defined!
diff --git a/apps/plugins/mp3_encoder.c b/apps/plugins/mp3_encoder.c
index 0368edbc88..177835549c 100644
--- a/apps/plugins/mp3_encoder.c
+++ b/apps/plugins/mp3_encoder.c
@@ -152,7 +152,7 @@ static const uint8_t ht_count[2][2][16] =
{ {15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }, /* table1 */
{ 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8 } } }; /* hleng1 */
-static const uint8_t t1HB[4] = {1,1,1,0};
+static const uint8_t t1HB[4] = {1,1,1,0};
static const uint8_t t2HB[9] = {1,2,1,3,1,1,3,2,0};
static const uint8_t t3HB[9] = {3,2,1,1,1,1,3,2,0};
static const uint8_t t5HB[16] = {1,2,6,5,3,1,4,4,7,5,7,1,6,1,1,0};
@@ -802,7 +802,7 @@ static const int16_t win[18][4] = {
{ 529, -831,-3747,-2387 },
{ 362, -471,-3579,-2747 },
{ 134, -146,-3352,-3072 } };
-
+
static char* mp3_enc_err[] = {
/* 0 */ "",
/* 1 */ "Cannot open file.",
@@ -880,21 +880,21 @@ static int wave_open(void)
if((wavfile = rb->open(wav_filename, O_RDONLY)) < 0)
return -1;
-
+
if(!checkString(wavfile,"RIFF")) return -2;
Read32BitsLowHigh(wavfile); /* complete wave chunk size */
if(!checkString(wavfile,"WAVE")) return -3;
if(!checkString(wavfile,"fmt ")) return -4;
-
+
header_size = Read32BitsLowHigh(wavfile); /* chunk size */
wFormatTag = Read16BitsLowHigh(wavfile);
-
+
cfg.channels = Read16BitsLowHigh(wavfile);
cfg.samplerate = Read32BitsLowHigh(wavfile);
/*dAvgBytesPerSec*/ Read32BitsLowHigh(wavfile);
/*wBlockAlign */ Read16BitsLowHigh(wavfile);
bits_per_samp = Read16BitsLowHigh(wavfile);
-
+
if(wFormatTag != 0x0001) return -5; /* linear PCM required */
if(bits_per_samp != 16) return -6; /* 16 bps required */
if(cfg.channels > 2) return -7; /* <=2 channels required */
@@ -904,11 +904,11 @@ static int wave_open(void)
if((cfg.samplerate != 16000) && (cfg.samplerate != 22050) &&
(cfg.samplerate != 24000) && (cfg.samplerate != 32000) &&
(cfg.samplerate != 44100) && (cfg.samplerate != 48000)) return -9;
-
+
header_size = 0x28;
wav_size = rb->filesize(wavfile);
rb->lseek(wavfile, header_size, SEEK_SET);
-
+
return 0;
}
@@ -946,7 +946,7 @@ static void encodeSideInfo( side_info_t si[2][2] )
{
int gr, ch, header;
uint32_t cc=0, sz=0;
-
+
/*
* MPEG header layout:
* AAAAAAAA AAABBCCD EEEEFFGH IIJJKLMM
@@ -1053,7 +1053,7 @@ static void Huffmancodebits( short *ix, char *xr_sign, side_info_t *gi )
if(bigvals > region2)
bits += HuffmanCode(ix, xr_sign, region2, bigvals, gi->table_select[2]);
-
+
if(count1 > bigvals)
bits += HuffmanCod1(ix, xr_sign, bigvals, count1, gi->table_select[3]);
@@ -1251,7 +1251,7 @@ static int choose_table( short *ix, uint32_t begin, uint32_t end, int *bits )
{
uint32_t i;
int max, table0, table1;
-
+
for(i=begin,max=0; i<end; i++)
if(ix[i] > max)
max = ix[i];
@@ -1408,7 +1408,7 @@ static int calc_runlen( short *ix, side_info_t *si )
int w = ix[i-2];
int x = ix[i-3];
int y = ix[i-4];
-
+
if((v | w | x | y) <= 1)
{
p = (y<<3) + (x<<2) + (w<<1) + (v);
@@ -1473,7 +1473,7 @@ static int quantize_int(int *xr, short *ix, side_info_t *si)
static void subdivide(side_info_t *si)
{
int scfb, count0, count1;
-
+
if( !si->address3 )
{ /* no bigvalue region */
si->region_0_1 = 0;
@@ -1535,7 +1535,7 @@ static int quantize_and_count_bits(int *xr, short *ix, side_info_t *si)
/************************************************************************/
/* The code selects the best quantStep for a particular set of scalefacs*/
-/************************************************************************/
+/************************************************************************/
static int inner_loop(int *xr, int max_bits, side_info_t *si)
{
int bits;
@@ -1877,7 +1877,7 @@ void window_subband2(short *x1, int a[SBLIMIT])
a[ 7] -= a[ 6];
a[22] -= a[ 7];
a[23] -= a[22];
-
+
xr = a[ 6]; a[ 6] = a[31] - xr; a[31] = a[31] + xr;
xr = a[ 7]; a[ 7] = a[30] - xr; a[30] = a[30] + xr;
xr = a[22]; a[22] = a[15] - xr; a[15] = a[15] + xr;
@@ -1897,23 +1897,23 @@ void window_subband2(short *x1, int a[SBLIMIT])
xr = a[ 1] - a[13]; a[ 1] += a[13]; a[13] = shft9(xr) * wp[ -4*27+25];
xr = a[16] - a[28]; a[16] += a[28]; a[28] = shft9(xr) * wp[ -4*27+25];
xr =-a[17] + a[29]; a[17] += a[29]; a[29] = shft9(xr) * wp[ -4*27+25];
-
+
xr = SQRT * shft9(a[ 2] - a[10]); a[ 2] += a[10]; a[10] = xr;
xr = SQRT * shft9(a[ 3] - a[11]); a[ 3] += a[11]; a[11] = xr;
xr = SQRT * shft9(a[26] - a[18]); a[18] += a[26]; a[26] = xr - a[18];
xr = SQRT * shft9(a[27] - a[19]); a[19] += a[27]; a[27] = xr - a[19];
-
+
xr = a[ 2]; a[19] -= a[ 3]; a[ 3] -= xr; a[ 2] = a[31] - xr; a[31] += xr;
xr = a[ 3]; a[11] -= a[19]; a[18] -= xr; a[ 3] = a[30] - xr; a[30] += xr;
xr = a[18]; a[27] -= a[11]; a[19] -= xr; a[18] = a[15] - xr; a[15] += xr;
-
+
xr = a[19]; a[10] -= xr; a[19] = a[14] - xr; a[14] += xr;
xr = a[10]; a[11] -= xr; a[10] = a[23] - xr; a[23] += xr;
xr = a[11]; a[26] -= xr; a[11] = a[22] - xr; a[22] += xr;
xr = a[26]; a[27] -= xr; a[26] = a[ 7] - xr; a[ 7] += xr;
-
+
xr = a[27]; a[27] = a[6] - xr; a[6] += xr;
-
+
xr = SQRT * shft9(a[ 0] - a[ 4]); a[ 0] += a[ 4]; a[ 4] = xr;
xr = SQRT * shft9(a[ 1] - a[ 5]); a[ 1] += a[ 5]; a[ 5] = xr;
xr = SQRT * shft9(a[16] - a[20]); a[16] += a[20]; a[20] = xr;
@@ -1922,15 +1922,15 @@ void window_subband2(short *x1, int a[SBLIMIT])
xr =-SQRT * shft9(a[ 9] - a[13]); a[ 9] += a[13]; a[13] = xr - a[ 9];
xr =-SQRT * shft9(a[25] - a[29]); a[25] += a[29]; a[29] = xr - a[25];
xr =-SQRT * shft9(a[24] + a[28]); a[24] -= a[28]; a[28] = xr - a[24];
-
+
xr = a[24] - a[16]; a[24] = xr;
xr = a[20] - xr; a[20] = xr;
xr = a[28] - xr; a[28] = xr;
-
+
xr = a[25] - a[17]; a[25] = xr;
xr = a[21] - xr; a[21] = xr;
xr = a[29] - xr; a[29] = xr;
-
+
xr = a[17] - a[1]; a[17] = xr;
xr = a[ 9] - xr; a[ 9] = xr;
xr = a[25] - xr; a[25] = xr;
@@ -1938,7 +1938,7 @@ void window_subband2(short *x1, int a[SBLIMIT])
xr = a[21] - xr; a[21] = xr;
xr = a[13] - xr; a[13] = xr;
xr = a[29] - xr; a[29] = xr;
-
+
xr = a[ 1] - a[0]; a[ 1] = xr;
xr = a[16] - xr; a[16] = xr;
xr = a[17] - xr; a[17] = xr;
@@ -1954,7 +1954,7 @@ void window_subband2(short *x1, int a[SBLIMIT])
xr = a[13] - xr; a[13] = xr;
xr = a[28] - xr; a[28] = xr;
xr = a[29] - xr; a[29] = xr;
-
+
xr = a[ 0]; a[ 0] += a[31]; a[31] -= xr;
xr = a[ 1]; a[ 1] += a[30]; a[30] -= xr;
xr = a[16]; a[16] += a[15]; a[15] -= xr;
@@ -1994,7 +1994,7 @@ void mdct_long(int *out, int *in)
ct = (tc1 - tc3 - tc4) * cx[6];
out[5] = ct + st;
out[6] = ct - st;
-
+
tc2 = (in[16] - in[10]) * cx[6];
ts6 = ts6 * cx[7] + in[4] * cx[8];
@@ -2002,12 +2002,12 @@ void mdct_long(int *out, int *in)
st = -ts5 * cx[4] + ts6 - ts7 * cx[5] + ts8 * cx[3];
out[1] = ct + st;
out[2] = ct - st;
-
+
ct = tc1 * cx[1] - tc2 - tc3 * cx[2] + tc4 * cx[0];
st = -ts5 * cx[5] + ts6 - ts7 * cx[3] + ts8 * cx[4];
out[ 9] = ct + st;
out[10] = ct - st;
-
+
ct = tc1 * cx[2] - tc2 + tc3 * cx[0] - tc4 * cx[1];
st = ts5 * cx[3] - ts6 + ts7 * cx[4] - ts8 * cx[5];
out[13] = ct + st;
@@ -2089,7 +2089,7 @@ static void init_mp3_encoder_engine(bool stereo, int bitrate, uint16_t sample_ra
cfg.mpg.smpl_id = find_samplerate_index(cfg.samplerate, &cfg.mpg.type);
cfg.mpg.bitr_id = find_bitrate_index(cfg.mpg.type, cfg.mpg.bitrate);
cfg.mpg.num_bands = num_bands[stereo ? cfg.mpg.type : 2][cfg.mpg.bitr_id];
-
+
if(0 == cfg.mpg.type)
{ /* use MPEG2 format */
cfg.smpl_per_frm = MAX_SAMP_PER_FRAME/2;
@@ -2172,13 +2172,13 @@ static void compress(void)
{
if((frames & 7) == 0)
{ rb->lcd_clear_display();
- rb->lcd_putsxyf(4, 20, "Frame %d / %d", frames,
+ rb->lcd_putsxyf(4, 20, "Frame %d / %d", frames,
wav_size/cfg.smpl_per_frm/cfg.channels/2);
rb->lcd_update();
}
/* encode one mp3 frame in this loop */
memset(CodedData.bbuf, 0, sizeof(CodedData.bbuf));
-
+
if((cfg.slot_lag += cfg.frac_per_frame) >= 64)
{ /* Padding for this frame */
cfg.slot_lag -= 64;
@@ -2556,19 +2556,7 @@ CONFIG_KEYPAD == MROBE500_PAD
#define MP3ENC_DONE BUTTON_POWER
#define MP3ENC_SELECT BUTTON_SELECT
-#elif CONFIG_KEYPAD == XDUOO_X3_PAD
-#define MP3ENC_PREV BUTTON_HOME
-#define MP3ENC_NEXT BUTTON_OPTION
-#define MP3ENC_DONE BUTTON_POWER
-#define MP3ENC_SELECT BUTTON_PLAY
-
-#elif CONFIG_KEYPAD == XDUOO_X3II_PAD
-#define MP3ENC_PREV BUTTON_HOME
-#define MP3ENC_NEXT BUTTON_OPTION
-#define MP3ENC_DONE BUTTON_POWER
-#define MP3ENC_SELECT BUTTON_PLAY
-
-#elif CONFIG_KEYPAD == XDUOO_X20_PAD
+#elif CONFIG_KEYPAD == XDUOO_X3_PAD || CONFIG_KEYPAD == XDUOO_X3II_PAD || CONFIG_KEYPAD == XDUOO_X20_PAD
#define MP3ENC_PREV BUTTON_HOME
#define MP3ENC_NEXT BUTTON_OPTION
#define MP3ENC_DONE BUTTON_POWER
@@ -2580,13 +2568,13 @@ CONFIG_KEYPAD == MROBE500_PAD
#define MP3ENC_DONE BUTTON_POWER
#define MP3ENC_SELECT BUTTON_PLAY
-#elif CONFIG_KEYPAD == IHIFI_770_PAD
+#elif CONFIG_KEYPAD == IHIFI_770_PAD || CONFIG_KEYPAD == IHIFI_800_PAD
#define MP3ENC_PREV BUTTON_PREV
#define MP3ENC_NEXT BUTTON_NEXT
#define MP3ENC_DONE BUTTON_POWER
#define MP3ENC_SELECT BUTTON_PLAY
-#elif CONFIG_KEYPAD == IHIFI_800_PAD
+#elif CONFIG_KEYPAD == EROSQ_PAD
#define MP3ENC_PREV BUTTON_PREV
#define MP3ENC_NEXT BUTTON_NEXT
#define MP3ENC_DONE BUTTON_POWER
diff --git a/apps/plugins/mpegplayer/mpeg_settings.c b/apps/plugins/mpegplayer/mpeg_settings.c
index 43143bdaee..1bc7d4db96 100644
--- a/apps/plugins/mpegplayer/mpeg_settings.c
+++ b/apps/plugins/mpegplayer/mpeg_settings.c
@@ -316,17 +316,7 @@ struct mpeg_settings settings;
#define MPEG_START_TIME_RIGHT2 BUTTON_VOL_DOWN
#define MPEG_START_TIME_EXIT BUTTON_POWER
-#elif CONFIG_KEYPAD == XDUOO_X3II_PAD
-#define MPEG_START_TIME_SELECT BUTTON_PLAY
-#define MPEG_START_TIME_LEFT BUTTON_PREV
-#define MPEG_START_TIME_RIGHT BUTTON_NEXT
-#define MPEG_START_TIME_UP BUTTON_HOME
-#define MPEG_START_TIME_DOWN BUTTON_OPTION
-#define MPEG_START_TIME_LEFT2 BUTTON_VOL_UP
-#define MPEG_START_TIME_RIGHT2 BUTTON_VOL_DOWN
-#define MPEG_START_TIME_EXIT BUTTON_POWER
-
-#elif CONFIG_KEYPAD == XDUOO_X20_PAD
+#elif CONFIG_KEYPAD == XDUOO_X3II_PAD || CONFIG_KEYPAD == XDUOO_X20_PAD
#define MPEG_START_TIME_SELECT BUTTON_PLAY
#define MPEG_START_TIME_LEFT BUTTON_PREV
#define MPEG_START_TIME_RIGHT BUTTON_NEXT
@@ -346,7 +336,7 @@ struct mpeg_settings settings;
#define MPEG_START_TIME_RIGHT2 BUTTON_VOL_DOWN
#define MPEG_START_TIME_EXIT BUTTON_POWER
-#elif CONFIG_KEYPAD == IHIFI_770_PAD
+#elif CONFIG_KEYPAD == IHIFI_770_PAD || CONFIG_KEYPAD == IHIFI_800_PAD
#define MPEG_START_TIME_SELECT BUTTON_PLAY
#define MPEG_START_TIME_LEFT BUTTON_HOME
#define MPEG_START_TIME_RIGHT BUTTON_VOL_DOWN
@@ -356,14 +346,12 @@ struct mpeg_settings settings;
#define MPEG_START_TIME_RIGHT2 (BUTTON_POWER + BUTTON_VOL_DOWN)
#define MPEG_START_TIME_EXIT BUTTON_POWER
-#elif CONFIG_KEYPAD == IHIFI_800_PAD
+#elif CONFIG_KEYPAD == EROSQ_PAD
#define MPEG_START_TIME_SELECT BUTTON_PLAY
-#define MPEG_START_TIME_LEFT BUTTON_HOME
-#define MPEG_START_TIME_RIGHT BUTTON_VOL_DOWN
+#define MPEG_START_TIME_LEFT BUTTON_SCROLL_BACK
+#define MPEG_START_TIME_RIGHT BUTTON_SCROLL_FWD
#define MPEG_START_TIME_UP BUTTON_PREV
#define MPEG_START_TIME_DOWN BUTTON_NEXT
-#define MPEG_START_TIME_LEFT2 (BUTTON_POWER + BUTTON_HOME)
-#define MPEG_START_TIME_RIGHT2 (BUTTON_POWER + BUTTON_VOL_DOWN)
#define MPEG_START_TIME_EXIT BUTTON_POWER
#else
diff --git a/apps/plugins/mpegplayer/mpegplayer.c b/apps/plugins/mpegplayer/mpegplayer.c
index 8028913c94..f86a6e55fd 100644
--- a/apps/plugins/mpegplayer/mpegplayer.c
+++ b/apps/plugins/mpegplayer/mpegplayer.c
@@ -23,9 +23,9 @@
/****************************************************************************
* NOTES:
- *
+ *
* mpegplayer is structured as follows:
- *
+ *
* +-->Video Thread-->Video Output-->LCD
* |
* UI-->Stream Manager-->+-->Audio Thread-->PCM buffer--Audio Device
@@ -36,53 +36,53 @@
* | Disk I/O
* Stream services
* (timing, etc.)
- *
+ *
* Thread list:
* 1) The main thread - Handles user input, settings, basic playback control
* and USB connect.
- *
+ *
* 2) Stream Manager thread - Handles playback state, events from streams
* such as when a stream is finished, stream commands, PCM state. The
* layer in which this thread run also handles arbitration of data
* requests between the streams and the disk buffer. The actual specific
* transport layer code may get moved out to support multiple container
* formats.
- *
+ *
* 3) Buffer thread - Buffers data in the background, generates notifications
* to streams when their data has been buffered, and watches streams'
* progress to keep data available during playback. Handles synchronous
* random access requests when the file cache is missed.
- *
+ *
* 4) Video thread (running on the COP for PortalPlayer targets) - Decodes
* the video stream and renders video frames to the LCD. Handles
* miscellaneous video tasks like frame and thumbnail printing.
- *
+ *
* 5) Audio thread (running on the main CPU to maintain consistency with the
* audio FIQ hander on PP) - Decodes audio frames and places them into
* the PCM buffer for rendering by the audio device.
- *
+ *
* Streams are neither aware of one another nor care about one another. All
* streams shall have their own thread (unless it is _really_ efficient to
* have a single thread handle a couple minor streams). All coordination of
* the streams is done through the stream manager. The clocking is controlled
* by and exposed by the stream manager to other streams and implemented at
* the PCM level.
- *
+ *
* Notes about MPEG files:
- *
+ *
* MPEG System Clock is 27MHz - i.e. 27000000 ticks/second.
- *
+ *
* FPS is represented in terms of a frame period - this is always an
* integer number of 27MHz ticks.
- *
+ *
* e.g. 29.97fps (30000/1001) NTSC video has an exact frame period of
* 900900 27MHz ticks.
- *
+ *
* In libmpeg2, info->sequence->frame_period contains the frame_period.
- *
+ *
* Working with Rockbox's 100Hz tick, the common frame rates would need
* to be as follows (1):
- *
+ *
* FPS | 27Mhz | 100Hz | 44.1KHz | 48KHz
* --------|-----------------------------------------------------------
* 10* | 2700000 | 10 | 4410 | 4800
@@ -93,9 +93,9 @@
* 25 | 1080000 | 4 | 1764 | 1920
* 29.9700 | 900900 | 3.336667 | 1471,47 | 1601.6
* 30 | 900000 | 3.333333 | 1470 | 1600
- *
+ *
* *Unofficial framerates
- *
+ *
* (1) But we don't really care since the audio clock is used anyway and has
* very fine resolution ;-)
*****************************************************************************/
@@ -450,16 +450,7 @@ CONFIG_KEYPAD == SANSA_M200_PAD
#define MPEG_RW BUTTON_PREV
#define MPEG_FF BUTTON_NEXT
-#elif CONFIG_KEYPAD == XDUOO_X3II_PAD
-#define MPEG_MENU BUTTON_PLAY
-#define MPEG_STOP BUTTON_POWER
-#define MPEG_PAUSE BUTTON_HOME
-#define MPEG_VOLDOWN BUTTON_VOL_DOWN
-#define MPEG_VOLUP BUTTON_VOL_UP
-#define MPEG_RW BUTTON_PREV
-#define MPEG_FF BUTTON_NEXT
-
-#elif CONFIG_KEYPAD == XDUOO_X20_PAD
+#elif CONFIG_KEYPAD == XDUOO_X3II_PAD || CONFIG_KEYPAD == XDUOO_X20_PAD
#define MPEG_MENU BUTTON_PLAY
#define MPEG_STOP BUTTON_POWER
#define MPEG_PAUSE BUTTON_HOME
@@ -477,7 +468,7 @@ CONFIG_KEYPAD == SANSA_M200_PAD
#define MPEG_RW BUTTON_PREV
#define MPEG_FF BUTTON_NEXT
-#elif CONFIG_KEYPAD == IHIFI_770_PAD
+#elif CONFIG_KEYPAD == IHIFI_770_PAD || CONFIG_KEYPAD == IHIFI_800_PAD
#define MPEG_MENU BUTTON_PLAY
#define MPEG_STOP BUTTON_POWER
#define MPEG_PAUSE BUTTON_HOME
@@ -486,10 +477,10 @@ CONFIG_KEYPAD == SANSA_M200_PAD
#define MPEG_RW BUTTON_PREV
#define MPEG_FF BUTTON_NEXT
-#elif CONFIG_KEYPAD == IHIFI_800_PAD
-#define MPEG_MENU BUTTON_PLAY
+#elif CONFIG_KEYPAD == EROSQ_PAD
+#define MPEG_MENU BUTTON_MENU
#define MPEG_STOP BUTTON_POWER
-#define MPEG_PAUSE BUTTON_HOME
+#define MPEG_PAUSE BUTTON_PLAY
#define MPEG_VOLDOWN BUTTON_VOL_DOWN
#define MPEG_VOLUP BUTTON_VOL_UP
#define MPEG_RW BUTTON_PREV
@@ -2508,7 +2499,7 @@ enum plugin_status plugin_start(const void* parameter)
/* Enter button loop and process UI */
next_action = button_loop();
manual_skip = next_action & VIDEO_ACTION_MANUAL;
- next_action &= ~VIDEO_ACTION_MANUAL;
+ next_action &= ~VIDEO_ACTION_MANUAL;
}
stream_close();
diff --git a/apps/plugins/oscilloscope.c b/apps/plugins/oscilloscope.c
index 2cf9b96409..d8bef0ae7f 100644
--- a/apps/plugins/oscilloscope.c
+++ b/apps/plugins/oscilloscope.c
@@ -484,21 +484,7 @@
#define OSCILLOSCOPE_VOL_DOWN BUTTON_VOL_DOWN
#define NEED_LASTBUTTON
-#elif (CONFIG_KEYPAD == XDUOO_X3II_PAD)
-#define OSCILLOSCOPE_QUIT BUTTON_POWER
-#define OSCILLOSCOPE_DRAWMODE_PRE BUTTON_PLAY
-#define OSCILLOSCOPE_DRAWMODE (BUTTON_PLAY | BUTTON_REL)
-#define OSCILLOSCOPE_ORIENTATION_PRE BUTTON_PLAY
-#define OSCILLOSCOPE_ORIENTATION (BUTTON_PLAY | BUTTON_REPEAT)
-#define OSCILLOSCOPE_ADVMODE BUTTON_HOME
-#define OSCILLOSCOPE_PAUSE BUTTON_OPTION
-#define OSCILLOSCOPE_SPEED_UP BUTTON_NEXT
-#define OSCILLOSCOPE_SPEED_DOWN BUTTON_PREV
-#define OSCILLOSCOPE_VOL_UP BUTTON_VOL_UP
-#define OSCILLOSCOPE_VOL_DOWN BUTTON_VOL_DOWN
-#define NEED_LASTBUTTON
-
-#elif (CONFIG_KEYPAD == XDUOO_X20_PAD)
+#elif (CONFIG_KEYPAD == XDUOO_X3II_PAD) || (CONFIG_KEYPAD == XDUOO_X20_PAD)
#define OSCILLOSCOPE_QUIT BUTTON_POWER
#define OSCILLOSCOPE_DRAWMODE_PRE BUTTON_PLAY
#define OSCILLOSCOPE_DRAWMODE (BUTTON_PLAY | BUTTON_REL)
@@ -526,7 +512,7 @@
#define OSCILLOSCOPE_VOL_DOWN BUTTON_VOL_DOWN
#define NEED_LASTBUTTON
-#elif (CONFIG_KEYPAD == IHIFI_770_PAD)
+#elif (CONFIG_KEYPAD == IHIFI_770_PAD) || (CONFIG_KEYPAD == IHIFI_800_PAD)
#define OSCILLOSCOPE_QUIT BUTTON_POWER
#define OSCILLOSCOPE_DRAWMODE_PRE BUTTON_PLAY
#define OSCILLOSCOPE_DRAWMODE (BUTTON_PLAY | BUTTON_REL)
@@ -540,19 +526,16 @@
#define OSCILLOSCOPE_VOL_DOWN BUTTON_VOL_DOWN
#define NEED_LASTBUTTON
-#elif (CONFIG_KEYPAD == IHIFI_800_PAD)
-#define OSCILLOSCOPE_QUIT BUTTON_POWER
-#define OSCILLOSCOPE_DRAWMODE_PRE BUTTON_PLAY
-#define OSCILLOSCOPE_DRAWMODE (BUTTON_PLAY | BUTTON_REL)
-#define OSCILLOSCOPE_ORIENTATION_PRE BUTTON_PLAY
-#define OSCILLOSCOPE_ORIENTATION (BUTTON_PLAY | BUTTON_REPEAT)
-#define OSCILLOSCOPE_ADVMODE BUTTON_HOME
-#define OSCILLOSCOPE_PAUSE (BUTTON_HOME | BUTTON_REPEAT)
-#define OSCILLOSCOPE_SPEED_UP BUTTON_NEXT
-#define OSCILLOSCOPE_SPEED_DOWN BUTTON_PREV
-#define OSCILLOSCOPE_VOL_UP BUTTON_VOL_UP
-#define OSCILLOSCOPE_VOL_DOWN BUTTON_VOL_DOWN
-#define NEED_LASTBUTTON
+#elif CONFIG_KEYPAD == EROSQ_PAD
+#define OSCILLOSCOPE_QUIT BUTTON_POWER
+#define OSCILLOSCOPE_DRAWMODE BUTTON_PREV
+#define OSCILLOSCOPE_ADVMODE BUTTON_NEXT
+#define OSCILLOSCOPE_ORIENTATION BUTTON_BACK
+#define OSCILLOSCOPE_PAUSE BUTTON_PLAY
+#define OSCILLOSCOPE_SPEED_UP BUTTON_SCROLL_FWD
+#define OSCILLOSCOPE_SPEED_DOWN BUTTON_SCROLL_BACK
+#define OSCILLOSCOPE_VOL_UP BUTTON_VOL_UP
+#define OSCILLOSCOPE_VOL_DOWN BUTTON_VOL_DOWN
#else
#error No keymap defined!
@@ -881,7 +864,7 @@ static void anim_draw_cursor_h(int x)
{
#if LCD_DEPTH > 1
rb->lcd_set_foreground(CURSOR_COLOR);
- rb->lcd_vline(x, 0, LCD_HEIGHT-1);
+ rb->lcd_vline(x, 0, LCD_HEIGHT-1);
rb->lcd_set_foreground(GRAPH_COLOR);
#else
rb->lcd_set_drawmode(DRMODE_COMPLEMENT);
@@ -895,7 +878,7 @@ static void anim_draw_cursor_v(int y)
{
#if LCD_DEPTH > 1 /* cursor bar */
rb->lcd_set_foreground(CURSOR_COLOR);
- rb->lcd_hline(0, LCD_WIDTH-1, y);
+ rb->lcd_hline(0, LCD_WIDTH-1, y);
rb->lcd_set_foreground(GRAPH_COLOR);
#else
rb->lcd_set_drawmode(DRMODE_COMPLEMENT);
@@ -1040,9 +1023,9 @@ static long anim_peaks_horizontal(void)
}
else
{
- left = last_left
+ left = last_left
+ (LCD_WIDTH - last_pos) * (last_left - cur_left) / d;
- right = last_right
+ right = last_right
+ (LCD_WIDTH - last_pos) * (last_right - cur_right) / d;
rb->lcd_drawline(
@@ -1066,7 +1049,7 @@ static long anim_peaks_horizontal(void)
}
}
break;
-
+
case DRAW_PIXEL:
left = last_left;
right = last_right;
@@ -1090,14 +1073,14 @@ static long anim_peaks_horizontal(void)
last_left = cur_left;
last_right = cur_right;
-
+
if (full_update)
{
osd_lcd_update();
}
else
{
- anim_draw_cursor_h(cur_x + 1); /* cursor bar */
+ anim_draw_cursor_h(cur_x + 1); /* cursor bar */
if (cur_x > last_pos)
{
@@ -1164,7 +1147,7 @@ static long anim_peaks_vertical(void)
cur_y -= shift;
last_pos -= shift;
}
- else
+ else
{
cur_y -= LCD_HEIGHT;
}
@@ -1219,7 +1202,7 @@ static long anim_peaks_vertical(void)
}
else
{
- left = last_left
+ left = last_left
+ (LCD_HEIGHT - last_pos) * (last_left - cur_left) / d;
right = last_right
+ (LCD_HEIGHT - last_pos) * (last_right - cur_right) / d;
@@ -1245,7 +1228,7 @@ static long anim_peaks_vertical(void)
}
}
break;
-
+
case DRAW_PIXEL:
left = last_left;
right = last_right;
@@ -1269,7 +1252,7 @@ static long anim_peaks_vertical(void)
last_left = cur_left;
last_right = cur_right;
-
+
if (full_update)
{
osd_lcd_update();
@@ -1358,7 +1341,7 @@ static void waveform_buffer_done(void)
waveform_buffer_have = have;
}
-
+
/* where the samples are obtained and buffered */
static void waveform_buffer_callback(const void *start, size_t size)
{
@@ -2053,7 +2036,7 @@ enum plugin_status plugin_start(const void* parameter)
osc_popupmsg(OSC_MSG_GRAPHMODE, osc.graphmode);
break;
#endif /* OSCILLOSCOPE_GRAPHMODE */
-
+
case OSCILLOSCOPE_ORIENTATION:
#ifdef OSCILLOSCOPE_ORIENTATION_PRE
if (lastbutton != OSCILLOSCOPE_ORIENTATION_PRE)
@@ -2075,7 +2058,7 @@ enum plugin_status plugin_start(const void* parameter)
graphmode_pause_unpause(paused);
osc_popupmsg(OSC_MSG_PAUSED, paused ? 1 : 0);
break;
-
+
case OSCILLOSCOPE_SPEED_UP:
case OSCILLOSCOPE_SPEED_UP | BUTTON_REPEAT:
{
@@ -2088,7 +2071,7 @@ enum plugin_status plugin_start(const void* parameter)
osc_popupmsg(OSC_MSG_SPEED, *val);
break;
}
-
+
case OSCILLOSCOPE_SPEED_DOWN:
case OSCILLOSCOPE_SPEED_DOWN | BUTTON_REPEAT:
{
diff --git a/apps/plugins/pacbox/pacbox.h b/apps/plugins/pacbox/pacbox.h
index a687806d96..39583edbd4 100644
--- a/apps/plugins/pacbox/pacbox.h
+++ b/apps/plugins/pacbox/pacbox.h
@@ -364,16 +364,7 @@
#define PACMAN_1UP BUTTON_VOLUP
#define PACMAN_COIN BUTTON_VOLDOWN
-#elif CONFIG_KEYPAD == XDUOO_X3II_PAD
-#define PACMAN_UP BUTTON_PREV
-#define PACMAN_DOWN BUTTON_NEXT
-#define PACMAN_LEFT BUTTON_HOME
-#define PACMAN_RIGHT BUTTON_VOL_DOWN
-#define PACMAN_MENU BUTTON_POWER
-#define PACMAN_1UP BUTTON_VOL_UP
-#define PACMAN_COIN BUTTON_PLAY
-
-#elif CONFIG_KEYPAD == XDUOO_X20_PAD
+#elif CONFIG_KEYPAD == XDUOO_X3II_PAD || CONFIG_KEYPAD == XDUOO_X20_PAD
#define PACMAN_UP BUTTON_PREV
#define PACMAN_DOWN BUTTON_NEXT
#define PACMAN_LEFT BUTTON_HOME
@@ -391,7 +382,8 @@
#define PACMAN_1UP BUTTON_VOL_UP
#define PACMAN_COIN BUTTON_PLAY
-#elif CONFIG_KEYPAD == IHIFI_770_PAD
+#elif CONFIG_KEYPAD == IHIFI_770_PAD || CONFIG_KEYPAD == IHIFI_800_PAD
+
#define PACMAN_UP BUTTON_PREV
#define PACMAN_DOWN BUTTON_NEXT
#define PACMAN_LEFT BUTTON_HOME
@@ -400,13 +392,12 @@
#define PACMAN_1UP BUTTON_VOL_UP
#define PACMAN_COIN BUTTON_PLAY
-#elif CONFIG_KEYPAD == IHIFI_800_PAD
-
+#elif CONFIG_KEYPAD == EROSQ_PAD
#define PACMAN_UP BUTTON_PREV
#define PACMAN_DOWN BUTTON_NEXT
-#define PACMAN_LEFT BUTTON_HOME
-#define PACMAN_RIGHT BUTTON_VOL_DOWN
-#define PACMAN_MENU BUTTON_POWER
+#define PACMAN_LEFT BUTTON_SCROLL_BACK
+#define PACMAN_RIGHT BUTTON_SCROLL_FWD
+#define PACMAN_MENU BUTTON_MENU
#define PACMAN_1UP BUTTON_VOL_UP
#define PACMAN_COIN BUTTON_PLAY
@@ -516,7 +507,7 @@
*/
#if defined(TOSHIBA_GIGABEAT_S) || defined (TOSHIBA_GIGABEAT_F) || \
defined(SANSA_FUZEPLUS)
-/* Gigabeat S,F and Sansa Fuze+ can manage the full framerate
+/* Gigabeat S,F and Sansa Fuze+ can manage the full framerate
(1 in 1 frames) */
#define FPS 60
#elif defined(IPOD_NANO)
diff --git a/apps/plugins/pegbox.c b/apps/plugins/pegbox.c
index 5f947fe5f2..b700051081 100644
--- a/apps/plugins/pegbox.c
+++ b/apps/plugins/pegbox.c
@@ -626,7 +626,7 @@ CONFIG_KEYPAD == MROBE500_PAD
#define LVL_UP_TEXT "VOL+"
#define LVL_DOWN_TEXT "VOL-"
-#elif CONFIG_KEYPAD == XDUOO_X3II_PAD
+#elif CONFIG_KEYPAD == XDUOO_X3II_PAD || CONFIG_KEYPAD == XDUOO_X20_PAD
#define PEGBOX_SELECT BUTTON_PLAY
#define PEGBOX_QUIT BUTTON_POWER
#define PEGBOX_RESTART (BUTTON_POWER | BUTTON_HOME)
@@ -643,7 +643,7 @@ CONFIG_KEYPAD == MROBE500_PAD
#define LVL_UP_TEXT "VOL+"
#define LVL_DOWN_TEXT "VOL-"
-#elif CONFIG_KEYPAD == XDUOO_X20_PAD
+#elif CONFIG_KEYPAD == FIIO_M3K_PAD
#define PEGBOX_SELECT BUTTON_PLAY
#define PEGBOX_QUIT BUTTON_POWER
#define PEGBOX_RESTART (BUTTON_POWER | BUTTON_HOME)
@@ -660,16 +660,16 @@ CONFIG_KEYPAD == MROBE500_PAD
#define LVL_UP_TEXT "VOL+"
#define LVL_DOWN_TEXT "VOL-"
-#elif CONFIG_KEYPAD == FIIO_M3K_PAD
+#elif CONFIG_KEYPAD == IHIFI_770_PAD || CONFIG_KEYPAD == IHIFI_800_PAD
#define PEGBOX_SELECT BUTTON_PLAY
#define PEGBOX_QUIT BUTTON_POWER
#define PEGBOX_RESTART (BUTTON_POWER | BUTTON_HOME)
-#define PEGBOX_LVL_UP BUTTON_VOL_UP
-#define PEGBOX_LVL_DOWN BUTTON_VOL_DOWN
-#define PEGBOX_UP BUTTON_HOME
-#define PEGBOX_DOWN BUTTON_OPTION
-#define PEGBOX_RIGHT BUTTON_NEXT
-#define PEGBOX_LEFT BUTTON_PREV
+#define PEGBOX_LVL_UP (BUTTON_POWER | BUTTON_VOL_UP)
+#define PEGBOX_LVL_DOWN (BUTTON_POWER | BUTTON_VOL_DOWN)
+#define PEGBOX_UP BUTTON_PREV
+#define PEGBOX_DOWN BUTTON_NEXT
+#define PEGBOX_RIGHT BUTTON_HOME
+#define PEGBOX_LEFT BUTTON_VOL_DOWN
#define SELECT_TEXT "PLAY"
#define QUIT_TEXT "POWER"
@@ -677,16 +677,16 @@ CONFIG_KEYPAD == MROBE500_PAD
#define LVL_UP_TEXT "VOL+"
#define LVL_DOWN_TEXT "VOL-"
-#elif CONFIG_KEYPAD == IHIFI_770_PAD
+#elif CONFIG_KEYPAD == FIIO_M3K_PAD
#define PEGBOX_SELECT BUTTON_PLAY
#define PEGBOX_QUIT BUTTON_POWER
#define PEGBOX_RESTART (BUTTON_POWER | BUTTON_HOME)
-#define PEGBOX_LVL_UP (BUTTON_POWER | BUTTON_VOL_UP)
-#define PEGBOX_LVL_DOWN (BUTTON_POWER | BUTTON_VOL_DOWN)
-#define PEGBOX_UP BUTTON_PREV
-#define PEGBOX_DOWN BUTTON_NEXT
-#define PEGBOX_RIGHT BUTTON_HOME
-#define PEGBOX_LEFT BUTTON_VOL_DOWN
+#define PEGBOX_LVL_UP BUTTON_VOL_UP
+#define PEGBOX_LVL_DOWN BUTTON_VOL_DOWN
+#define PEGBOX_UP BUTTON_HOME
+#define PEGBOX_DOWN BUTTON_OPTION
+#define PEGBOX_RIGHT BUTTON_NEXT
+#define PEGBOX_LEFT BUTTON_PREV
#define SELECT_TEXT "PLAY"
#define QUIT_TEXT "POWER"
@@ -694,28 +694,24 @@ CONFIG_KEYPAD == MROBE500_PAD
#define LVL_UP_TEXT "VOL+"
#define LVL_DOWN_TEXT "VOL-"
-#elif CONFIG_KEYPAD == IHIFI_800_PAD
+#elif CONFIG_KEYPAD == EROSQ_PAD
#define PEGBOX_SELECT BUTTON_PLAY
#define PEGBOX_QUIT BUTTON_POWER
-#define PEGBOX_RESTART (BUTTON_POWER | BUTTON_HOME)
-#define PEGBOX_LVL_UP (BUTTON_POWER | BUTTON_VOL_UP)
-#define PEGBOX_LVL_DOWN (BUTTON_POWER | BUTTON_VOL_DOWN)
+#define PEGBOX_RESTART BUTTON_BACK
+#define PEGBOX_LVL_UP BUTTON_VOL_UP
+#define PEGBOX_LVL_DOWN BUTTON_VOL_DOWN
#define PEGBOX_UP BUTTON_PREV
#define PEGBOX_DOWN BUTTON_NEXT
-#define PEGBOX_RIGHT BUTTON_HOME
-#define PEGBOX_LEFT BUTTON_VOL_DOWN
+#define PEGBOX_RIGHT BUTTON_SCROLL_FWD
+#define PEGBOX_LEFT BUTTON_SCROLL_BACK
#define SELECT_TEXT "PLAY"
#define QUIT_TEXT "POWER"
-#define RESTART_TEXT "HOME"
+#define RESTART_TEXT "BACK"
#define LVL_UP_TEXT "VOL+"
#define LVL_DOWN_TEXT "VOL-"
-#else
-#error Unsupported keymap!
-#endif
-
-#ifdef HAVE_TOUCHSCREEN
+#elif defined(HAVE_TOUCHSCREEN)
#ifndef PEGBOX_QUIT
#define PEGBOX_QUIT BUTTON_TOPLEFT
#endif
@@ -758,9 +754,10 @@ CONFIG_KEYPAD == MROBE500_PAD
#ifndef LVL_DOWN_TEXT
#define LVL_DOWN_TEXT "BOTTOMRIGHT"
#endif
+#else
+#error Unsupported keymap!
#endif
-
/* get several sizes from the bitmaps */
#ifdef BMPWIDTH_pegbox_pieces
#define PIECE_WIDTH BMPWIDTH_pegbox_pieces
@@ -1083,7 +1080,7 @@ static void pegbox_draw_board(struct game_context* pb)
if(type != SPACE) {
rb->lcd_bitmap_part(pegbox_pieces, 0, (type-1)*PIECE_HEIGHT,
- STRIDE( SCREEN_MAIN,
+ STRIDE( SCREEN_MAIN,
BMPWIDTH_pegbox_pieces,BMPHEIGHT_pegbox_pieces),
c * PIECE_WIDTH + BOARD_X,
r * PIECE_HEIGHT + BOARD_Y, PIECE_WIDTH,
diff --git a/apps/plugins/pong.c b/apps/plugins/pong.c
index 41525f3ffe..d5952aac35 100644
--- a/apps/plugins/pong.c
+++ b/apps/plugins/pong.c
@@ -293,15 +293,7 @@ CONFIG_KEYPAD == MROBE500_PAD
#define PONG_RIGHT_UP BUTTON_HOME
#define PONG_RIGHT_DOWN BUTTON_NEXT
-#elif CONFIG_KEYPAD == XDUOO_X3II_PAD
-#define PONG_QUIT BUTTON_POWER
-#define PONG_PAUSE BUTTON_PLAY
-#define PONG_LEFT_UP BUTTON_PREV
-#define PONG_LEFT_DOWN BUTTON_OPTION
-#define PONG_RIGHT_UP BUTTON_HOME
-#define PONG_RIGHT_DOWN BUTTON_NEXT
-
-#elif CONFIG_KEYPAD == XDUOO_X20_PAD
+#elif CONFIG_KEYPAD == XDUOO_X3II_PAD || CONFIG_KEYPAD == XDUOO_X20_PAD
#define PONG_QUIT BUTTON_POWER
#define PONG_PAUSE BUTTON_PLAY
#define PONG_LEFT_UP BUTTON_PREV
@@ -317,7 +309,7 @@ CONFIG_KEYPAD == MROBE500_PAD
#define PONG_RIGHT_UP BUTTON_HOME
#define PONG_RIGHT_DOWN BUTTON_NEXT
-#elif CONFIG_KEYPAD == IHIFI_770_PAD
+#elif CONFIG_KEYPAD == IHIFI_770_PAD || CONFIG_KEYPAD == IHIFI_800_PAD
#define PONG_QUIT BUTTON_POWER
#define PONG_PAUSE BUTTON_PREV
#define PONG_LEFT_UP BUTTON_PLAY
@@ -325,13 +317,14 @@ CONFIG_KEYPAD == MROBE500_PAD
#define PONG_RIGHT_UP BUTTON_VOL_UP
#define PONG_RIGHT_DOWN BUTTON_VOL_DOWN
-#elif CONFIG_KEYPAD == IHIFI_800_PAD
+#elif CONFIG_KEYPAD == EROSQ_PAD
#define PONG_QUIT BUTTON_POWER
-#define PONG_PAUSE BUTTON_PREV
-#define PONG_LEFT_UP BUTTON_PLAY
-#define PONG_LEFT_DOWN BUTTON_HOME
-#define PONG_RIGHT_UP BUTTON_VOL_UP
-#define PONG_RIGHT_DOWN BUTTON_VOL_DOWN
+#define PONG_PAUSE BUTTON_PLAY
+#define PONG_LEFT_UP BUTTON_SCROLL_BACK
+#define PONG_LEFT_DOWN BUTTON_SCROLL_FWD
+#define PONG_RIGHT_UP BUTTON_PREV
+#define PONG_RIGHT_DOWN BUTTON_NEXT
+
#else
#error No keymap defined!
diff --git a/apps/plugins/reversi/reversi-gui.h b/apps/plugins/reversi/reversi-gui.h
index 1547e52573..0a2348a28d 100644
--- a/apps/plugins/reversi/reversi-gui.h
+++ b/apps/plugins/reversi/reversi-gui.h
@@ -45,9 +45,9 @@
#define REVERSI_BUTTON_LEFT (BUTTON_LEFT | BUTTON_SCROLL_BACK)
#define REVERSI_BUTTON_RIGHT (BUTTON_RIGHT | BUTTON_SCROLL_FWD)
#define REVERSI_BUTTON_MAKE_MOVE BUTTON_SELECT
-#define REVERSI_BUTTON_MAKE_MOVE_SHORTPRESS
+#define REVERSI_BUTTON_MAKE_MOVE_SHORTPRESS
#define REVERSI_BUTTON_MENU BUTTON_SELECT
-#define REVERSI_BUTTON_MENU_LONGPRESS
+#define REVERSI_BUTTON_MENU_LONGPRESS
#elif (CONFIG_KEYPAD == IAUDIO_X5M5_PAD)
#define REVERSI_BUTTON_QUIT BUTTON_POWER
@@ -96,9 +96,9 @@
#define REVERSI_BUTTON_LEFT BUTTON_LEFT
#define REVERSI_BUTTON_RIGHT BUTTON_RIGHT
#define REVERSI_BUTTON_MAKE_MOVE BUTTON_SELECT
-#define REVERSI_BUTTON_MAKE_MOVE_SHORTPRESS
+#define REVERSI_BUTTON_MAKE_MOVE_SHORTPRESS
#define REVERSI_BUTTON_MENU BUTTON_SELECT
-#define REVERSI_BUTTON_MENU_LONGPRESS
+#define REVERSI_BUTTON_MENU_LONGPRESS
#elif (CONFIG_KEYPAD == SANSA_FUZE_PAD)
#define REVERSI_BUTTON_QUIT (BUTTON_HOME|BUTTON_REPEAT)
@@ -107,9 +107,9 @@
#define REVERSI_BUTTON_LEFT BUTTON_LEFT
#define REVERSI_BUTTON_RIGHT BUTTON_RIGHT
#define REVERSI_BUTTON_MAKE_MOVE BUTTON_SELECT
-#define REVERSI_BUTTON_MAKE_MOVE_SHORTPRESS
+#define REVERSI_BUTTON_MAKE_MOVE_SHORTPRESS
#define REVERSI_BUTTON_MENU BUTTON_SELECT
-#define REVERSI_BUTTON_MENU_LONGPRESS
+#define REVERSI_BUTTON_MENU_LONGPRESS
#elif CONFIG_KEYPAD == MROBE500_PAD
#define REVERSI_BUTTON_QUIT BUTTON_POWER
@@ -233,17 +233,17 @@
#define REVERSI_BUTTON_UP BUTTON_REW
#define REVERSI_BUTTON_DOWN BUTTON_FF
#define REVERSI_BUTTON_LEFT BUTTON_VOL_DOWN
-#define REVERSI_BUTTON_RIGHT BUTTON_VOL_UP
+#define REVERSI_BUTTON_RIGHT BUTTON_VOL_UP
#define REVERSI_BUTTON_MAKE_MOVE BUTTON_FUNC
-#define REVERSI_BUTTON_MAKE_MOVE_SHORTPRESS
+#define REVERSI_BUTTON_MAKE_MOVE_SHORTPRESS
#define REVERSI_BUTTON_MENU BUTTON_FUNC
-#define REVERSI_BUTTON_MENU_LONGPRESS
+#define REVERSI_BUTTON_MENU_LONGPRESS
#elif CONFIG_KEYPAD == MPIO_HD300_PAD
#define REVERSI_BUTTON_UP BUTTON_UP
#define REVERSI_BUTTON_DOWN BUTTON_DOWN
#define REVERSI_BUTTON_LEFT BUTTON_REW
-#define REVERSI_BUTTON_RIGHT BUTTON_FF
+#define REVERSI_BUTTON_RIGHT BUTTON_FF
#define REVERSI_BUTTON_MAKE_MOVE BUTTON_ENTER
#define REVERSI_BUTTON_MENU BUTTON_MENU
@@ -251,7 +251,7 @@
#define REVERSI_BUTTON_UP BUTTON_UP
#define REVERSI_BUTTON_DOWN BUTTON_DOWN
#define REVERSI_BUTTON_LEFT BUTTON_LEFT
-#define REVERSI_BUTTON_RIGHT BUTTON_RIGHT
+#define REVERSI_BUTTON_RIGHT BUTTON_RIGHT
#define REVERSI_BUTTON_MAKE_MOVE BUTTON_PLAYPAUSE
#define REVERSI_BUTTON_MENU BUTTON_BACK
@@ -269,7 +269,7 @@
#define REVERSI_BUTTON_UP BUTTON_UP
#define REVERSI_BUTTON_DOWN BUTTON_DOWN
#define REVERSI_BUTTON_LEFT BUTTON_LEFT
-#define REVERSI_BUTTON_RIGHT BUTTON_RIGHT
+#define REVERSI_BUTTON_RIGHT BUTTON_RIGHT
#define REVERSI_BUTTON_MAKE_MOVE BUTTON_SELECT
#define REVERSI_BUTTON_MENU BUTTON_POWER
@@ -319,18 +319,7 @@
#define REVERSI_BUTTON_MENU BUTTON_PLAY
#define REVERSI_BUTTON_MENU_LONGPRESS
-#elif CONFIG_KEYPAD == XDUOO_X3II_PAD
-#define REVERSI_BUTTON_QUIT BUTTON_POWER
-#define REVERSI_BUTTON_UP BUTTON_HOME
-#define REVERSI_BUTTON_DOWN BUTTON_OPTION
-#define REVERSI_BUTTON_LEFT BUTTON_PREV
-#define REVERSI_BUTTON_RIGHT BUTTON_NEXT
-#define REVERSI_BUTTON_MAKE_MOVE BUTTON_PLAY
-#define REVERSI_BUTTON_MAKE_MOVE_SHORTPRESS
-#define REVERSI_BUTTON_MENU BUTTON_PLAY
-#define REVERSI_BUTTON_MENU_LONGPRESS
-
-#elif CONFIG_KEYPAD == XDUOO_X20_PAD
+#elif CONFIG_KEYPAD == XDUOO_X3II_PAD || CONFIG_KEYPAD == XDUOO_X20_PAD
#define REVERSI_BUTTON_QUIT BUTTON_POWER
#define REVERSI_BUTTON_UP BUTTON_HOME
#define REVERSI_BUTTON_DOWN BUTTON_OPTION
@@ -352,27 +341,25 @@
#define REVERSI_BUTTON_MENU BUTTON_PLAY
#define REVERSI_BUTTON_MENU_LONGPRESS
-#elif CONFIG_KEYPAD == IHIFI_770_PAD
+#elif CONFIG_KEYPAD == IHIFI_770_PAD || CONFIG_KEYPAD == IHIFI_800_PAD
#define REVERSI_BUTTON_QUIT BUTTON_POWER
#define REVERSI_BUTTON_UP BUTTON_PREV
#define REVERSI_BUTTON_DOWN BUTTON_NEXT
#define REVERSI_BUTTON_LEFT BUTTON_PREV
#define REVERSI_BUTTON_RIGHT BUTTON_VOL_DOWN
#define REVERSI_BUTTON_MAKE_MOVE BUTTON_PLAY
-#define REVERSI_BUTTON_MAKE_MOVE_SHORTPRESS
+#define REVERSI_BUTTON_MAKE_MOVE_SHORTPRESS
#define REVERSI_BUTTON_MENU BUTTON_PLAY
-#define REVERSI_BUTTON_MENU_LONGPRESS
+#define REVERSI_BUTTON_MENU_LONGPRESS
-#elif CONFIG_KEYPAD == IHIFI_800_PAD
+#elif CONFIG_KEYPAD == EROSQ_PAD
#define REVERSI_BUTTON_QUIT BUTTON_POWER
#define REVERSI_BUTTON_UP BUTTON_PREV
#define REVERSI_BUTTON_DOWN BUTTON_NEXT
-#define REVERSI_BUTTON_LEFT BUTTON_PREV
-#define REVERSI_BUTTON_RIGHT BUTTON_VOL_DOWN
+#define REVERSI_BUTTON_LEFT BUTTON_SCROLL_BACK
+#define REVERSI_BUTTON_RIGHT BUTTON_SCROLL_FWD
#define REVERSI_BUTTON_MAKE_MOVE BUTTON_PLAY
-#define REVERSI_BUTTON_MAKE_MOVE_SHORTPRESS
-#define REVERSI_BUTTON_MENU BUTTON_PLAY
-#define REVERSI_BUTTON_MENU_LONGPRESS
+#define REVERSI_BUTTON_MENU BUTTON_MENU
#else
#error No keymap defined!
diff --git a/apps/plugins/rockblox.c b/apps/plugins/rockblox.c
index ec6d892a0b..6a8b50a68d 100644
--- a/apps/plugins/rockblox.c
+++ b/apps/plugins/rockblox.c
@@ -431,31 +431,7 @@
#define ROCKBLOX_ROTATE_CCW BUTTON_VOLDOWN
#define ROCKBLOX_DOWN BUTTON_DOWN
-#elif CONFIG_KEYPAD == XDUOO_X3_PAD
-
-#define ROCKBLOX_OFF BUTTON_POWER
-#define ROCKBLOX_ROTATE_CCW BUTTON_HOME
-#define ROCKBLOX_ROTATE_CCW2 BUTTON_VOL_DOWN
-#define ROCKBLOX_ROTATE_CW BUTTON_VOL_UP
-#define ROCKBLOX_DOWN BUTTON_OPTION
-#define ROCKBLOX_LEFT BUTTON_PREV
-#define ROCKBLOX_RIGHT BUTTON_NEXT
-#define ROCKBLOX_DROP (BUTTON_PLAY|BUTTON_REL)
-#define ROCKBLOX_RESTART (BUTTON_PLAY|BUTTON_REPEAT)
-
-#elif CONFIG_KEYPAD == XDUOO_X3II_PAD
-
-#define ROCKBLOX_OFF BUTTON_POWER
-#define ROCKBLOX_ROTATE_CCW BUTTON_HOME
-#define ROCKBLOX_ROTATE_CCW2 BUTTON_VOL_DOWN
-#define ROCKBLOX_ROTATE_CW BUTTON_VOL_UP
-#define ROCKBLOX_DOWN BUTTON_OPTION
-#define ROCKBLOX_LEFT BUTTON_PREV
-#define ROCKBLOX_RIGHT BUTTON_NEXT
-#define ROCKBLOX_DROP (BUTTON_PLAY|BUTTON_REL)
-#define ROCKBLOX_RESTART (BUTTON_PLAY|BUTTON_REPEAT)
-
-#elif CONFIG_KEYPAD == XDUOO_X20_PAD
+#elif (CONFIG_KEYPAD == XDUOO_X3_PAD) || (CONFIG_KEYPAD == XDUOO_X3II_PAD) || (CONFIG_KEYPAD == XDUOO_X20_PAD)
#define ROCKBLOX_OFF BUTTON_POWER
#define ROCKBLOX_ROTATE_CCW BUTTON_HOME
@@ -479,7 +455,7 @@
#define ROCKBLOX_DROP (BUTTON_PLAY|BUTTON_REL)
#define ROCKBLOX_RESTART (BUTTON_PLAY|BUTTON_REPEAT)
-#elif CONFIG_KEYPAD == IHIFI_770_PAD
+#elif (CONFIG_KEYPAD == IHIFI_770_PAD) || (CONFIG_KEYPAD == IHIFI_800_PAD)
#define ROCKBLOX_OFF BUTTON_POWER
#define ROCKBLOX_ROTATE_CCW BUTTON_HOME
@@ -491,17 +467,15 @@
#define ROCKBLOX_DROP (BUTTON_POWER|BUTTON_PLAY)
#define ROCKBLOX_RESTART (BUTTON_POWER|BUTTON_REPEAT)
-#elif CONFIG_KEYPAD == IHIFI_800_PAD
-
+#elif CONFIG_KEYPAD == EROSQ_PAD
#define ROCKBLOX_OFF BUTTON_POWER
-#define ROCKBLOX_ROTATE_CCW BUTTON_HOME
-#define ROCKBLOX_ROTATE_CCW2 BUTTON_VOL_DOWN
-#define ROCKBLOX_ROTATE_CW BUTTON_VOL_UP
-#define ROCKBLOX_DOWN BUTTON_PLAY
+#define ROCKBLOX_ROTATE_CCW BUTTON_SCROLL_BACK
+#define ROCKBLOX_ROTATE_CW BUTTON_SCROLL_FWD
+#define ROCKBLOX_DOWN BUTTON_MENU
#define ROCKBLOX_LEFT BUTTON_PREV
#define ROCKBLOX_RIGHT BUTTON_NEXT
-#define ROCKBLOX_DROP (BUTTON_POWER|BUTTON_PLAY)
-#define ROCKBLOX_RESTART (BUTTON_POWER|BUTTON_REPEAT)
+#define ROCKBLOX_DROP BUTTON_PLAY
+#define ROCKBLOX_RESTART BUTTON_BACK
#else
#error No keymap defined!
diff --git a/apps/plugins/rockboy/rockboy.c b/apps/plugins/rockboy/rockboy.c
index c96946cf7d..75de5230f2 100644
--- a/apps/plugins/rockboy/rockboy.c
+++ b/apps/plugins/rockboy/rockboy.c
@@ -425,17 +425,7 @@ static void setoptions (void)
options.SELECT = BUTTON_VOL_UP;
options.MENU = BUTTON_POWER;
-#elif CONFIG_KEYPAD == XDUOO_X3II_PAD
- options.UP = BUTTON_PREV;
- options.DOWN = BUTTON_NEXT;
-
- options.A = BUTTON_HOME;
- options.B = BUTTON_OPTION;
- options.START = BUTTON_VOL_DOWN;
- options.SELECT = BUTTON_VOL_UP;
- options.MENU = BUTTON_POWER;
-
-#elif CONFIG_KEYPAD == XDUOO_X20_PAD
+#elif CONFIG_KEYPAD == XDUOO_X3II_PAD || CONFIG_KEYPAD == XDUOO_X20_PAD
options.UP = BUTTON_PREV;
options.DOWN = BUTTON_NEXT;
@@ -455,7 +445,7 @@ static void setoptions (void)
options.SELECT = BUTTON_VOL_UP;
options.MENU = BUTTON_POWER;
-#elif CONFIG_KEYPAD == IHIFI_770_PAD
+#elif CONFIG_KEYPAD == IHIFI_770_PAD || CONFIG_KEYPAD == IHIFI_800_PAD
options.UP = BUTTON_PREV;
options.DOWN = BUTTON_NEXT;
@@ -465,14 +455,16 @@ static void setoptions (void)
options.SELECT = BUTTON_HOME;
options.MENU = BUTTON_POWER;
-#elif CONFIG_KEYPAD == IHIFI_800_PAD
- options.UP = BUTTON_PREV;
- options.DOWN = BUTTON_NEXT;
+#elif CONFIG_KEYPAD == EROSQ_PAD
+ options.UP = BUTTON_PREV;
+ options.DOWN = BUTTON_NEXT;
+ options.LEFT = BUTTON_SCROLL_BACK;
+ options.RIGHT = BUTTON_SCROLL_FWD;
- options.A = BUTTON_VOL_UP;
- options.B = BUTTON_VOL_DOWN;
- options.START = BUTTON_PLAY;
- options.SELECT = BUTTON_HOME;
+ options.A = BUTTON_MENU;
+ options.B = BUTTON_BACK;
+ options.START = BUTTON_VOL_DOWN;
+ options.SELECT = BUTTON_VOL_UP;
options.MENU = BUTTON_POWER;
#else
diff --git a/apps/plugins/sliding_puzzle.c b/apps/plugins/sliding_puzzle.c
index 7683016066..8c70f6b4a6 100644
--- a/apps/plugins/sliding_puzzle.c
+++ b/apps/plugins/sliding_puzzle.c
@@ -63,7 +63,7 @@
#define PUZZLE_PICTURE BUTTON_A
#elif (CONFIG_KEYPAD == SANSA_E200_PAD) || \
-(CONFIG_KEYPAD == SANSA_C200_PAD)
+(CONFIG_KEYPAD == SANSA_C200_PAD)
#define PUZZLE_QUIT BUTTON_POWER
#define PUZZLE_LEFT BUTTON_LEFT
#define PUZZLE_RIGHT BUTTON_RIGHT
@@ -312,16 +312,7 @@ CONFIG_KEYPAD == MROBE500_PAD
#define PUZZLE_SHUFFLE (BUTTON_HOME | BUTTON_PWRALT)
#define PUZZLE_PICTURE BUTTON_PLAY
-#elif (CONFIG_KEYPAD == XDUOO_X3II_PAD)
-#define PUZZLE_QUIT BUTTON_POWER
-#define PUZZLE_LEFT BUTTON_PREV
-#define PUZZLE_RIGHT BUTTON_NEXT
-#define PUZZLE_UP BUTTON_HOME
-#define PUZZLE_DOWN BUTTON_OPTION
-#define PUZZLE_SHUFFLE (BUTTON_HOME | BUTTON_POWER)
-#define PUZZLE_PICTURE BUTTON_PLAY
-
-#elif (CONFIG_KEYPAD == XDUOO_X20_PAD)
+#elif (CONFIG_KEYPAD == XDUOO_X3II_PAD) || (CONFIG_KEYPAD == XDUOO_X20_PAD)
#define PUZZLE_QUIT BUTTON_POWER
#define PUZZLE_LEFT BUTTON_PREV
#define PUZZLE_RIGHT BUTTON_NEXT
@@ -339,7 +330,7 @@ CONFIG_KEYPAD == MROBE500_PAD
#define PUZZLE_SHUFFLE (BUTTON_HOME | BUTTON_POWER)
#define PUZZLE_PICTURE BUTTON_PLAY
-#elif (CONFIG_KEYPAD == IHIFI_770_PAD)
+#elif (CONFIG_KEYPAD == IHIFI_770_PAD) || (CONFIG_KEYPAD == IHIFI_800_PAD)
#define PUZZLE_QUIT BUTTON_POWER
#define PUZZLE_LEFT BUTTON_HOME
#define PUZZLE_RIGHT BUTTON_VOL_DOWN
@@ -348,15 +339,16 @@ CONFIG_KEYPAD == MROBE500_PAD
#define PUZZLE_SHUFFLE (BUTTON_HOME | BUTTON_POWER)
#define PUZZLE_PICTURE BUTTON_PLAY
-#elif (CONFIG_KEYPAD == IHIFI_800_PAD)
+#elif (CONFIG_KEYPAD == EROSQ_PAD)
#define PUZZLE_QUIT BUTTON_POWER
-#define PUZZLE_LEFT BUTTON_HOME
-#define PUZZLE_RIGHT BUTTON_VOL_DOWN
+#define PUZZLE_LEFT BUTTON_SCROLL_BACK
+#define PUZZLE_RIGHT BUTTON_SCROLL_FWD
#define PUZZLE_UP BUTTON_PREV
#define PUZZLE_DOWN BUTTON_NEXT
-#define PUZZLE_SHUFFLE (BUTTON_HOME | BUTTON_POWER)
+#define PUZZLE_SHUFFLE BUTTON_BACK
#define PUZZLE_PICTURE BUTTON_PLAY
+
#else
#error No keymap defined!
#endif
@@ -383,13 +375,13 @@ CONFIG_KEYPAD == MROBE500_PAD
#ifndef PUZZLE_PICTURE
#define PUZZLE_PICTURE BUTTON_CENTER
#endif
-#ifndef PUZZLE_QUIT_TEXT
+#ifndef PUZZLE_QUIT_TEXT
#define PUZZLE_QUIT_TEXT "[TOPLEFT]"
#endif
-#ifndef PUZZLE_SHUFFLE_TEXT
+#ifndef PUZZLE_SHUFFLE_TEXT
#define PUZZLE_SHUFFLE_TEXT "[BOTTOMLEFT]"
#endif
-#ifndef PUZZLE_PICTURE_TEXT
+#ifndef PUZZLE_PICTURE_TEXT
#define PUZZLE_PICTURE_TEXT "[CENTER]"
#endif
#endif
@@ -563,7 +555,7 @@ static void draw_spot(int p, int x, int y)
an appropriate hole graphic */
rb->lcd_bitmap_part(sliding_puzzle, ((p-1)%SPOTS_X)*SPOTS_WIDTH,
((p-1)/SPOTS_X)*SPOTS_HEIGHT,
- STRIDE( SCREEN_MAIN,
+ STRIDE( SCREEN_MAIN,
BMPWIDTH_sliding_puzzle, BMPHEIGHT_sliding_puzzle),
x, y, SPOTS_WIDTH, SPOTS_HEIGHT);
#else
@@ -580,8 +572,8 @@ static void draw_spot(int p, int x, int y)
{
rb->lcd_bitmap_part( puzzle_bmp_ptr, ((p-1)%SPOTS_X)*SPOTS_WIDTH,
((p-1)/SPOTS_X)*SPOTS_HEIGHT,
- STRIDE( SCREEN_MAIN,
- BMPWIDTH_sliding_puzzle, BMPHEIGHT_sliding_puzzle),
+ STRIDE( SCREEN_MAIN,
+ BMPWIDTH_sliding_puzzle, BMPHEIGHT_sliding_puzzle),
x, y, SPOTS_WIDTH, SPOTS_HEIGHT);
} else {
rb->lcd_drawrect(x, y, SPOTS_WIDTH, SPOTS_HEIGHT);
diff --git a/apps/plugins/snake.c b/apps/plugins/snake.c
index ebfb39c9a7..0f2bcdce6c 100644
--- a/apps/plugins/snake.c
+++ b/apps/plugins/snake.c
@@ -24,7 +24,7 @@ Snake!
by Itai Shaked
-ok, a little explanation -
+ok, a little explanation -
board holds the snake and apple position - 1+ - snake body (the number
represents the age [1 is the snake's head]).
-1 is an apple, and 0 is a clear spot.
@@ -273,15 +273,7 @@ dir is the current direction of the snake - 0=up, 1=right, 2=down, 3=left;
#define SNAKE_DOWN BUTTON_OPTION
#define SNAKE_PLAYPAUSE BUTTON_PLAY
-#elif CONFIG_KEYPAD == XDUOO_X3II_PAD
-#define SNAKE_QUIT BUTTON_POWER
-#define SNAKE_LEFT BUTTON_PREV
-#define SNAKE_RIGHT BUTTON_NEXT
-#define SNAKE_UP BUTTON_HOME
-#define SNAKE_DOWN BUTTON_OPTION
-#define SNAKE_PLAYPAUSE BUTTON_PLAY
-
-#elif CONFIG_KEYPAD == XDUOO_X20_PAD
+#elif CONFIG_KEYPAD == XDUOO_X3II_PAD || CONFIG_KEYPAD == XDUOO_X20_PAD
#define SNAKE_QUIT BUTTON_POWER
#define SNAKE_LEFT BUTTON_PREV
#define SNAKE_RIGHT BUTTON_NEXT
@@ -297,7 +289,7 @@ dir is the current direction of the snake - 0=up, 1=right, 2=down, 3=left;
#define SNAKE_DOWN BUTTON_OPTION
#define SNAKE_PLAYPAUSE BUTTON_PLAY
-#elif CONFIG_KEYPAD == IHIFI_770_PAD
+#elif CONFIG_KEYPAD == IHIFI_770_PAD || CONFIG_KEYPAD == IHIFI_800_PAD
#define SNAKE_QUIT BUTTON_POWER
#define SNAKE_LEFT BUTTON_HOME
#define SNAKE_RIGHT BUTTON_VOL_DOWN
@@ -305,10 +297,10 @@ dir is the current direction of the snake - 0=up, 1=right, 2=down, 3=left;
#define SNAKE_DOWN BUTTON_NEXT
#define SNAKE_PLAYPAUSE BUTTON_PLAY
-#elif CONFIG_KEYPAD == IHIFI_800_PAD
+#elif CONFIG_KEYPAD == EROSQ_PAD
#define SNAKE_QUIT BUTTON_POWER
-#define SNAKE_LEFT BUTTON_HOME
-#define SNAKE_RIGHT BUTTON_VOL_DOWN
+#define SNAKE_LEFT BUTTON_SCROLL_BACK
+#define SNAKE_RIGHT BUTTON_SCROLL_FWD
#define SNAKE_UP BUTTON_PREV
#define SNAKE_DOWN BUTTON_NEXT
#define SNAKE_PLAYPAUSE BUTTON_PLAY
diff --git a/apps/plugins/snake2.c b/apps/plugins/snake2.c
index 77400dfff1..464af413f9 100644
--- a/apps/plugins/snake2.c
+++ b/apps/plugins/snake2.c
@@ -401,16 +401,7 @@ CONFIG_KEYPAD == MROBE500_PAD
#define SNAKE2_PLAYPAUSE BUTTON_PLAY
#define SNAKE2_PLAYPAUSE_TEXT "PLAY"
-#elif (CONFIG_KEYPAD == XDUOO_X3II_PAD)
-#define SNAKE2_LEFT BUTTON_PREV
-#define SNAKE2_RIGHT BUTTON_NEXT
-#define SNAKE2_UP BUTTON_HOME
-#define SNAKE2_DOWN BUTTON_OPTION
-#define SNAKE2_QUIT BUTTON_POWER
-#define SNAKE2_PLAYPAUSE BUTTON_PLAY
-#define SNAKE2_PLAYPAUSE_TEXT "PLAY"
-
-#elif (CONFIG_KEYPAD == XDUOO_X20_PAD)
+#elif (CONFIG_KEYPAD == XDUOO_X3II_PAD) || (CONFIG_KEYPAD == XDUOO_X20_PAD)
#define SNAKE2_LEFT BUTTON_PREV
#define SNAKE2_RIGHT BUTTON_NEXT
#define SNAKE2_UP BUTTON_HOME
@@ -428,7 +419,7 @@ CONFIG_KEYPAD == MROBE500_PAD
#define SNAKE2_PLAYPAUSE BUTTON_PLAY
#define SNAKE2_PLAYPAUSE_TEXT "PLAY"
-#elif (CONFIG_KEYPAD == IHIFI_770_PAD)
+#elif (CONFIG_KEYPAD == IHIFI_770_PAD) || (CONFIG_KEYPAD == IHIFI_800_PAD)
#define SNAKE2_LEFT BUTTON_HOME
#define SNAKE2_RIGHT BUTTON_VOL_DOWN
#define SNAKE2_UP BUTTON_PREV
@@ -437,9 +428,9 @@ CONFIG_KEYPAD == MROBE500_PAD
#define SNAKE2_PLAYPAUSE BUTTON_PLAY
#define SNAKE2_PLAYPAUSE_TEXT "PLAY"
-#elif (CONFIG_KEYPAD == IHIFI_800_PAD)
-#define SNAKE2_LEFT BUTTON_HOME
-#define SNAKE2_RIGHT BUTTON_VOL_DOWN
+#elif (CONFIG_KEYPAD == EROSQ_PAD)
+#define SNAKE2_LEFT BUTTON_SCROLL_BACK
+#define SNAKE2_RIGHT BUTTON_SCROLL_FWD
#define SNAKE2_UP BUTTON_PREV
#define SNAKE2_DOWN BUTTON_NEXT
#define SNAKE2_QUIT BUTTON_POWER
@@ -451,7 +442,7 @@ CONFIG_KEYPAD == MROBE500_PAD
#endif
#ifdef HAVE_TOUCHSCREEN
-#ifndef SNAKE2_LEFT
+#ifndef SNAKE2_LEFT
#define SNAKE2_LEFT BUTTON_MIDLEFT
#endif
#ifndef SNAKE2_RIGHT
diff --git a/apps/plugins/sokoban.c b/apps/plugins/sokoban.c
index da3c303ace..e779722790 100644
--- a/apps/plugins/sokoban.c
+++ b/apps/plugins/sokoban.c
@@ -631,23 +631,7 @@
#define BUTTON_SAVE BUTTON_PLAY
#define BUTTON_SAVE_NAME "PLAY"
-#elif CONFIG_KEYPAD == XDUOO_X3II_PAD
-#define SOKOBAN_LEFT BUTTON_PREV
-#define SOKOBAN_RIGHT BUTTON_NEXT
-#define SOKOBAN_UP BUTTON_HOME
-#define SOKOBAN_DOWN BUTTON_OPTION
-#define SOKOBAN_MENU BUTTON_POWER
-#define SOKOBAN_UNDO_PRE BUTTON_PLAY
-#define SOKOBAN_UNDO (BUTTON_PLAY | BUTTON_REL)
-#define SOKOBAN_REDO (BUTTON_POWER | BUTTON_PLAY)
-#define SOKOBAN_LEVEL_DOWN BUTTON_VOL_DOWN
-#define SOKOBAN_LEVEL_REPEAT (BUTTON_PLAY | BUTTON_NEXT)
-#define SOKOBAN_LEVEL_UP BUTTON_VOL_UP
-#define SOKOBAN_PAUSE BUTTON_PLAY
-#define BUTTON_SAVE BUTTON_PLAY
-#define BUTTON_SAVE_NAME "PLAY"
-
-#elif CONFIG_KEYPAD == XDUOO_X20_PAD
+#elif CONFIG_KEYPAD == XDUOO_X3II_PAD || CONFIG_KEYPAD == XDUOO_X20_PAD
#define SOKOBAN_LEFT BUTTON_PREV
#define SOKOBAN_RIGHT BUTTON_NEXT
#define SOKOBAN_UP BUTTON_HOME
@@ -679,7 +663,7 @@
#define BUTTON_SAVE BUTTON_PLAY
#define BUTTON_SAVE_NAME "PLAY"
-#elif CONFIG_KEYPAD == IHIFI_770_PAD
+#elif CONFIG_KEYPAD == IHIFI_770_PAD || CONFIG_KEYPAD == IHIFI_800_PAD
#define SOKOBAN_LEFT BUTTON_HOME
#define SOKOBAN_RIGHT BUTTON_VOL_DOWN
#define SOKOBAN_UP BUTTON_PREV
@@ -695,18 +679,18 @@
#define BUTTON_SAVE BUTTON_PLAY
#define BUTTON_SAVE_NAME "PLAY"
-#elif CONFIG_KEYPAD == IHIFI_800_PAD
-#define SOKOBAN_LEFT BUTTON_HOME
-#define SOKOBAN_RIGHT BUTTON_VOL_DOWN
+#elif CONFIG_KEYPAD == EROSQ_PAD
+#define SOKOBAN_LEFT BUTTON_SCROLL_BACK
+#define SOKOBAN_RIGHT BUTTON_SCROLL_FWD
#define SOKOBAN_UP BUTTON_PREV
#define SOKOBAN_DOWN BUTTON_NEXT
-#define SOKOBAN_MENU BUTTON_POWER
+#define SOKOBAN_MENU BUTTON_MENU
#define SOKOBAN_UNDO_PRE BUTTON_PLAY
#define SOKOBAN_UNDO (BUTTON_PLAY | BUTTON_REL)
#define SOKOBAN_REDO (BUTTON_POWER | BUTTON_PLAY)
-#define SOKOBAN_LEVEL_DOWN (BUTTON_POWER | BUTTON_VOL_DOWN)
-#define SOKOBAN_LEVEL_REPEAT (BUTTON_POWER | BUTTON_HOME)
-#define SOKOBAN_LEVEL_UP (BUTTON_POWER | BUTTON_VOL_UP)
+#define SOKOBAN_LEVEL_DOWN BUTTON_VOL_DOWN
+#define SOKOBAN_LEVEL_REPEAT BUTTON_BACK
+#define SOKOBAN_LEVEL_UP BUTTON_VOL_UP
#define SOKOBAN_PAUSE BUTTON_PLAY
#define BUTTON_SAVE BUTTON_PLAY
#define BUTTON_SAVE_NAME "PLAY"
@@ -1286,56 +1270,56 @@ static void update_screen(void)
case ' ': /* floor */
rb->lcd_bitmap_part(sokoban_tiles, 0, 0*SOKOBAN_TILESIZE,
- STRIDE( SCREEN_MAIN,
+ STRIDE( SCREEN_MAIN,
BMPWIDTH_sokoban_tiles,
- BMPHEIGHT_sokoban_tiles),
+ BMPHEIGHT_sokoban_tiles),
c, r, SOKOBAN_TILESIZE, SOKOBAN_TILESIZE);
break;
case '#': /* wall */
rb->lcd_bitmap_part(sokoban_tiles, 0, 1*SOKOBAN_TILESIZE,
- STRIDE( SCREEN_MAIN,
- BMPWIDTH_sokoban_tiles,
+ STRIDE( SCREEN_MAIN,
+ BMPWIDTH_sokoban_tiles,
BMPHEIGHT_sokoban_tiles),
c, r, SOKOBAN_TILESIZE, SOKOBAN_TILESIZE);
break;
case '$': /* box */
rb->lcd_bitmap_part(sokoban_tiles, 0, 2*SOKOBAN_TILESIZE,
- STRIDE( SCREEN_MAIN,
- BMPWIDTH_sokoban_tiles,
+ STRIDE( SCREEN_MAIN,
+ BMPWIDTH_sokoban_tiles,
BMPHEIGHT_sokoban_tiles),
c, r, SOKOBAN_TILESIZE,SOKOBAN_TILESIZE);
break;
case '*': /* box on goal */
rb->lcd_bitmap_part(sokoban_tiles, 0, 3*SOKOBAN_TILESIZE,
- STRIDE( SCREEN_MAIN,
- BMPWIDTH_sokoban_tiles,
+ STRIDE( SCREEN_MAIN,
+ BMPWIDTH_sokoban_tiles,
BMPHEIGHT_sokoban_tiles),
c, r, SOKOBAN_TILESIZE, SOKOBAN_TILESIZE);
break;
case '.': /* goal */
rb->lcd_bitmap_part(sokoban_tiles, 0, 4*SOKOBAN_TILESIZE,
- STRIDE( SCREEN_MAIN,
- BMPWIDTH_sokoban_tiles,
+ STRIDE( SCREEN_MAIN,
+ BMPWIDTH_sokoban_tiles,
BMPHEIGHT_sokoban_tiles),
c, r, SOKOBAN_TILESIZE, SOKOBAN_TILESIZE);
break;
case '@': /* player */
rb->lcd_bitmap_part(sokoban_tiles, 0, 5*SOKOBAN_TILESIZE,
- STRIDE( SCREEN_MAIN,
- BMPWIDTH_sokoban_tiles,
+ STRIDE( SCREEN_MAIN,
+ BMPWIDTH_sokoban_tiles,
BMPHEIGHT_sokoban_tiles),
c, r, SOKOBAN_TILESIZE, SOKOBAN_TILESIZE);
break;
case '+': /* player on goal */
rb->lcd_bitmap_part(sokoban_tiles, 0, 6*SOKOBAN_TILESIZE,
- STRIDE( SCREEN_MAIN,
- BMPWIDTH_sokoban_tiles,
+ STRIDE( SCREEN_MAIN,
+ BMPWIDTH_sokoban_tiles,
BMPHEIGHT_sokoban_tiles),
c, r, SOKOBAN_TILESIZE, SOKOBAN_TILESIZE);
break;
diff --git a/apps/plugins/solitaire.c b/apps/plugins/solitaire.c
index 1996dc97e7..6c496663cf 100644
--- a/apps/plugins/solitaire.c
+++ b/apps/plugins/solitaire.c
@@ -646,26 +646,7 @@ CONFIG_KEYPAD == MROBE500_PAD
# define HK_CUR2STACK "DBL PLAY"
# define HK_REM2STACK "NEXT"
-#elif CONFIG_KEYPAD == XDUOO_X3II_PAD
-# define SOL_QUIT BUTTON_POWER
-# define SOL_UP BUTTON_HOME
-# define SOL_DOWN BUTTON_OPTION
-# define SOL_LEFT BUTTON_PREV
-# define SOL_RIGHT BUTTON_NEXT
-# define SOL_MOVE_PRE BUTTON_PLAY
-# define SOL_MOVE (BUTTON_PLAY | BUTTON_REL)
-# define SOL_DRAW (BUTTON_POWER | BUTTON_REPEAT)
-# define SOL_REM2CUR BUTTON_VOL_DOWN
-# define SOL_CUR2STACK_PRE BUTTON_PLAY
-# define SOL_CUR2STACK (BUTTON_PLAY | BUTTON_REPEAT)
-# define SOL_REM2STACK BUTTON_VOL_UP
-# define HK_MOVE "PLAY"
-# define HK_DRAW "DBL HOME"
-# define HK_REM2CUR "PREV"
-# define HK_CUR2STACK "DBL PLAY"
-# define HK_REM2STACK "NEXT"
-
-#elif CONFIG_KEYPAD == XDUOO_X20_PAD
+#elif CONFIG_KEYPAD == XDUOO_X3II_PAD || CONFIG_KEYPAD == XDUOO_X20_PAD
# define SOL_QUIT BUTTON_POWER
# define SOL_UP BUTTON_HOME
# define SOL_DOWN BUTTON_OPTION
@@ -703,7 +684,7 @@ CONFIG_KEYPAD == MROBE500_PAD
# define HK_CUR2STACK "DBL PLAY"
# define HK_REM2STACK "NEXT"
-#elif CONFIG_KEYPAD == IHIFI_770_PAD
+#elif CONFIG_KEYPAD == IHIFI_770_PAD || CONFIG_KEYPAD == IHIFI_800_PAD
# define SOL_QUIT BUTTON_POWER
# define SOL_UP BUTTON_PREV
# define SOL_DOWN BUTTON_NEXT
@@ -722,24 +703,24 @@ CONFIG_KEYPAD == MROBE500_PAD
# define HK_CUR2STACK "DBL PLAY"
# define HK_REM2STACK "POWER+"
-#elif CONFIG_KEYPAD == IHIFI_800_PAD
+#elif CONFIG_KEYPAD == EROSQ_PAD
# define SOL_QUIT BUTTON_POWER
# define SOL_UP BUTTON_PREV
# define SOL_DOWN BUTTON_NEXT
-# define SOL_LEFT BUTTON_HOME
-# define SOL_RIGHT BUTTON_VOL_DOWN
-# define SOL_MOVE_PRE BUTTON_VOL_UP
+# define SOL_LEFT BUTTON_SCROLL_BACK
+# define SOL_RIGHT BUTTON_SCROLL_FWD
+# define SOL_MOVE_PRE BUTTON_PLAY
# define SOL_MOVE (BUTTON_PLAY | BUTTON_REL)
# define SOL_DRAW (BUTTON_POWER | BUTTON_REPEAT)
-# define SOL_REM2CUR (BUTTON_POWER | BUTTON_VOL_DOWN)
+# define SOL_REM2CUR BUTTON_VOL_DOWN
# define SOL_CUR2STACK_PRE BUTTON_PLAY
# define SOL_CUR2STACK (BUTTON_PLAY | BUTTON_REPEAT)
-# define SOL_REM2STACK (BUTTON_POWER | BUTTON_VOL_UP)
+# define SOL_REM2STACK BUTTON_VOL_UP
# define HK_MOVE "PLAY"
-# define HK_DRAW "DBL POWER"
-# define HK_REM2CUR "POWER"
+# define HK_DRAW "DBL HOME"
+# define HK_REM2CUR "PREV"
# define HK_CUR2STACK "DBL PLAY"
-# define HK_REM2STACK "POWER+"
+# define HK_REM2STACK "NEXT"
#else
#error No keymap defined!
@@ -950,8 +931,8 @@ static void draw_card( card_t *card, int x, int y,
if( card->known )
{
rb->lcd_bitmap_part( card_deck, CARD_GFX_WIDTH * card->num,
- CARD_GFX_HEIGHT * card->suit,
- STRIDE(SCREEN_MAIN,
+ CARD_GFX_HEIGHT * card->suit,
+ STRIDE(SCREEN_MAIN,
BMPWIDTH_card_deck, BMPHEIGHT_card_deck),
x+1, y+1, CARD_GFX_WIDTH, CARD_GFX_HEIGHT );
}
@@ -967,7 +948,7 @@ static void draw_card( card_t *card, int x, int y,
static void draw_empty_stack( int s, int x, int y, bool cursor )
{
rb->lcd_bitmap_part( solitaire_suitsi, 0,
- CARD_GFX_HEIGHT * s,
+ CARD_GFX_HEIGHT * s,
STRIDE( SCREEN_MAIN,
BMPWIDTH_solitaire_suitsi, BMPHEIGHT_solitaire_suitsi),
x+1, y+1, CARD_GFX_WIDTH, CARD_GFX_HEIGHT );
@@ -1618,11 +1599,11 @@ static int save_game( void )
static int load_game( void )
{
int checksum, retval;
-
+
int fd = open_save_file( O_RDONLY );
if( fd < 0 )
return -1;
-
+
retval = 0; /* Assume good case */
if( ( rb->lseek( fd, -(off_t)sizeof( int ), SEEK_END ) == -((ssize_t)sizeof( int ))-1 )
|| ( rb->read( fd, &checksum, sizeof( int ) ) < ((ssize_t)sizeof( int )) )
@@ -1646,7 +1627,7 @@ static int load_game( void )
rb->splash( 2*HZ, "Save file was corrupted. Aborting." );
retval = -3;
}
-
+
rb->close( fd );
delete_save_file();
return retval;
diff --git a/apps/plugins/spacerocks.c b/apps/plugins/spacerocks.c
index 1b3bdda0d1..67816120a1 100644
--- a/apps/plugins/spacerocks.c
+++ b/apps/plugins/spacerocks.c
@@ -327,25 +327,7 @@
#define AST_RIGHT BUTTON_RIGHT
#define AST_FIRE BUTTON_SELECT
-#elif (CONFIG_KEYPAD == XDUOO_X3_PAD)
-#define AST_PAUSE BUTTON_VOL_UP
-#define AST_QUIT BUTTON_POWER
-#define AST_THRUST BUTTON_HOME
-#define AST_HYPERSPACE BUTTON_OPTION
-#define AST_LEFT BUTTON_PREV
-#define AST_RIGHT BUTTON_NEXT
-#define AST_FIRE BUTTON_PLAY
-
-#elif (CONFIG_KEYPAD == XDUOO_X3II_PAD)
-#define AST_PAUSE BUTTON_VOL_UP
-#define AST_QUIT BUTTON_POWER
-#define AST_THRUST BUTTON_HOME
-#define AST_HYPERSPACE BUTTON_OPTION
-#define AST_LEFT BUTTON_PREV
-#define AST_RIGHT BUTTON_NEXT
-#define AST_FIRE BUTTON_PLAY
-
-#elif (CONFIG_KEYPAD == XDUOO_X20_PAD)
+#elif (CONFIG_KEYPAD == XDUOO_X3_PAD) || (CONFIG_KEYPAD == XDUOO_X3II_PAD) || (CONFIG_KEYPAD == XDUOO_X20_PAD)
#define AST_PAUSE BUTTON_VOL_UP
#define AST_QUIT BUTTON_POWER
#define AST_THRUST BUTTON_HOME
@@ -363,7 +345,7 @@
#define AST_RIGHT BUTTON_NEXT
#define AST_FIRE BUTTON_PLAY
-#elif (CONFIG_KEYPAD == IHIFI_770_PAD)
+#elif (CONFIG_KEYPAD == IHIFI_770_PAD) || (CONFIG_KEYPAD == IHIFI_800_PAD)
#define AST_PAUSE BUTTON_PLAY
#define AST_QUIT BUTTON_POWER
#define AST_THRUST BUTTON_NEXT
@@ -372,14 +354,14 @@
#define AST_RIGHT BUTTON_VOL_DOWN
#define AST_FIRE BUTTON_VOL_UP
-#elif (CONFIG_KEYPAD == IHIFI_800_PAD)
-#define AST_PAUSE BUTTON_PLAY
+#elif (CONFIG_KEYPAD == EROSQ_PAD)
+#define AST_PAUSE BUTTON_PREV
#define AST_QUIT BUTTON_POWER
-#define AST_THRUST BUTTON_NEXT
-#define AST_HYPERSPACE BUTTON_PREV
-#define AST_LEFT BUTTON_HOME
-#define AST_RIGHT BUTTON_VOL_DOWN
-#define AST_FIRE BUTTON_VOL_UP
+#define AST_THRUST BUTTON_PLAY
+#define AST_HYPERSPACE BUTTON_MENU
+#define AST_LEFT BUTTON_SCROLL_BACK
+#define AST_RIGHT BUTTON_SCROLL_FWD
+#define AST_FIRE BUTTON_BACK
#else
#error No keymap defined!
diff --git a/apps/plugins/star.c b/apps/plugins/star.c
index cf8522fbac..e44c867cdc 100644
--- a/apps/plugins/star.c
+++ b/apps/plugins/star.c
@@ -588,23 +588,7 @@
#define STAR_LEVEL_DOWN_NAME "PLAY + PREV"
#define STAR_LEVEL_REPEAT_NAME "PLAY + OPTION"
-#elif CONFIG_KEYPAD == XDUOO_X3II_PAD
-#define STAR_QUIT BUTTON_POWER
-#define STAR_LEFT BUTTON_PREV
-#define STAR_RIGHT BUTTON_NEXT
-#define STAR_UP BUTTON_HOME
-#define STAR_DOWN BUTTON_OPTION
-#define STAR_TOGGLE_CONTROL BUTTON_PLAY
-#define STAR_LEVEL_UP (BUTTON_PLAY | BUTTON_NEXT)
-#define STAR_LEVEL_DOWN (BUTTON_PLAY | BUTTON_PREV)
-#define STAR_LEVEL_REPEAT (BUTTON_PLAY | BUTTON_OPTION)
-#define STAR_TOGGLE_CONTROL_NAME "PLAY"
-#define STAR_QUIT_NAME "POWER"
-#define STAR_LEVEL_UP_NAME "PLAY + NEXT"
-#define STAR_LEVEL_DOWN_NAME "PLAY + PREV"
-#define STAR_LEVEL_REPEAT_NAME "PLAY + OPTION"
-
-#elif CONFIG_KEYPAD == XDUOO_X20_PAD
+#elif CONFIG_KEYPAD == XDUOO_X3II_PAD || CONFIG_KEYPAD == XDUOO_X20_PAD
#define STAR_QUIT BUTTON_POWER
#define STAR_LEFT BUTTON_PREV
#define STAR_RIGHT BUTTON_NEXT
@@ -636,7 +620,7 @@
#define STAR_LEVEL_DOWN_NAME "PLAY + PREV"
#define STAR_LEVEL_REPEAT_NAME "PLAY + OPTION"
-#elif CONFIG_KEYPAD == IHIFI_770_PAD
+#elif CONFIG_KEYPAD == IHIFI_770_PAD || CONFIG_KEYPAD == IHIFI_800_PAD
#define STAR_QUIT BUTTON_POWER
#define STAR_LEFT BUTTON_HOME
#define STAR_RIGHT BUTTON_VOL_DOWN
@@ -652,21 +636,21 @@
#define STAR_LEVEL_DOWN_NAME "POWER + VOL-"
#define STAR_LEVEL_REPEAT_NAME "POWER + HOME"
-#elif CONFIG_KEYPAD == IHIFI_800_PAD
+#elif CONFIG_KEYPAD == EROSQ_PAD
#define STAR_QUIT BUTTON_POWER
-#define STAR_LEFT BUTTON_HOME
-#define STAR_RIGHT BUTTON_VOL_DOWN
+#define STAR_LEFT BUTTON_SCROLL_BACK
+#define STAR_RIGHT BUTTON_SCROLL_FWD
#define STAR_UP BUTTON_PREV
#define STAR_DOWN BUTTON_NEXT
#define STAR_TOGGLE_CONTROL BUTTON_PLAY
-#define STAR_LEVEL_UP (BUTTON_POWER | BUTTON_VOL_UP)
-#define STAR_LEVEL_DOWN (BUTTON_POWER | BUTTON_VOL_DOWN)
-#define STAR_LEVEL_REPEAT (BUTTON_POWER | BUTTON_HOME)
+#define STAR_LEVEL_UP BUTTON_VOL_UP
+#define STAR_LEVEL_DOWN BUTTON_VOL_DOWN
+#define STAR_LEVEL_REPEAT BUTTON_BACK
#define STAR_TOGGLE_CONTROL_NAME "PLAY"
#define STAR_QUIT_NAME "POWER"
-#define STAR_LEVEL_UP_NAME "POWER + VOL+"
-#define STAR_LEVEL_DOWN_NAME "POWER + VOL-"
-#define STAR_LEVEL_REPEAT_NAME "POWER + HOME"
+#define STAR_LEVEL_UP_NAME "VOL UP"
+#define STAR_LEVEL_DOWN_NAME "VOL DN"
+#define STAR_LEVEL_REPEAT_NAME "BACK"
#else
#error No keymap defined!
@@ -1035,8 +1019,8 @@ static void star_display_board_info(int current_level)
label_pos_y, "C:");
rb->lcd_bitmap_part(star_tiles, 0, control == STAR_CONTROL_BALL ?
- BALL*TILE_HEIGHT : BLOCK*TILE_HEIGHT,
- STRIDE( SCREEN_MAIN,
+ BALL*TILE_HEIGHT : BLOCK*TILE_HEIGHT,
+ STRIDE( SCREEN_MAIN,
BMPWIDTH_star_tiles, BMPHEIGHT_star_tiles),
STAR_OFFSET_X + (STAR_WIDTH-1) * TILE_WIDTH,
tile_pos_y, TILE_WIDTH, TILE_HEIGHT);
@@ -1082,7 +1066,7 @@ static int star_load_level(int current_level)
STAR_OFFSET_X + x * TILE_WIDTH, \
STAR_OFFSET_Y + y * TILE_HEIGHT, \
TILE_WIDTH, TILE_HEIGHT);
-
+
case STAR_VOID:
DRAW_TILE( SPACE );
break;
@@ -1128,12 +1112,12 @@ static void star_animate_tile(int tile_no, int start_x, int start_y,
for (i = 1 ; i <= TILE_WIDTH ; i++)
{
STAR_SLEEP
- rb->lcd_bitmap_part(star_tiles, 0, SPACE * TILE_HEIGHT,
- STRIDE( SCREEN_MAIN,
+ rb->lcd_bitmap_part(star_tiles, 0, SPACE * TILE_HEIGHT,
+ STRIDE( SCREEN_MAIN,
BMPWIDTH_star_tiles, BMPHEIGHT_star_tiles),
start_x, start_y, TILE_WIDTH, TILE_HEIGHT);
rb->lcd_bitmap_part(star_tiles, 0, tile_no * TILE_HEIGHT,
- STRIDE( SCREEN_MAIN,
+ STRIDE( SCREEN_MAIN,
BMPWIDTH_star_tiles, BMPHEIGHT_star_tiles),
start_x + delta_x * i, start_y, TILE_WIDTH, TILE_HEIGHT);
rb->lcd_update_rect(start_x + delta_x * i - (delta_x>0?1:0),
@@ -1145,12 +1129,12 @@ static void star_animate_tile(int tile_no, int start_x, int start_y,
for (i = 1 ; i <= TILE_HEIGHT ; i++)
{
STAR_SLEEP
- rb->lcd_bitmap_part(star_tiles, 0, SPACE * TILE_HEIGHT,
- STRIDE( SCREEN_MAIN,
+ rb->lcd_bitmap_part(star_tiles, 0, SPACE * TILE_HEIGHT,
+ STRIDE( SCREEN_MAIN,
BMPWIDTH_star_tiles, BMPHEIGHT_star_tiles),
start_x, start_y, TILE_WIDTH, TILE_HEIGHT);
- rb->lcd_bitmap_part(star_tiles, 0, tile_no * TILE_HEIGHT,
- STRIDE( SCREEN_MAIN,
+ rb->lcd_bitmap_part(star_tiles, 0, tile_no * TILE_HEIGHT,
+ STRIDE( SCREEN_MAIN,
BMPWIDTH_star_tiles, BMPHEIGHT_star_tiles),
start_x, start_y + delta_y * i, TILE_WIDTH, TILE_HEIGHT);
rb->lcd_update_rect(start_x, start_y + delta_y * i - (delta_y>0?1:0),
@@ -1169,7 +1153,7 @@ static int star_run_game(int current_level)
int key;
#if defined(STAR_LEVEL_DOWN_PRE) || \
defined(STAR_LEVEL_UP_PRE) || \
- defined(STAR_TOGGLE_CONTROL_PRE)
+ defined(STAR_TOGGLE_CONTROL_PRE)
int lastkey = BUTTON_NONE;
#endif
@@ -1261,7 +1245,7 @@ static int star_run_game(int current_level)
}
#if defined(STAR_LEVEL_DOWN_PRE) || \
defined(STAR_LEVEL_UP_PRE) || \
- defined(STAR_TOGGLE_CONTROL_PRE)
+ defined(STAR_TOGGLE_CONTROL_PRE)
if (key != BUTTON_NONE)
lastkey = key;
#endif
diff --git a/apps/plugins/stopwatch.c b/apps/plugins/stopwatch.c
index 801c735f00..db9cfd57da 100644
--- a/apps/plugins/stopwatch.c
+++ b/apps/plugins/stopwatch.c
@@ -277,23 +277,7 @@
#define STOPWATCH_SCROLL_UP BUTTON_UP
#define STOPWATCH_SCROLL_DOWN BUTTON_DOWN
-#elif CONFIG_KEYPAD == XDUOO_X3_PAD
-#define STOPWATCH_QUIT BUTTON_POWER
-#define STOPWATCH_START_STOP BUTTON_NEXT
-#define STOPWATCH_RESET_TIMER BUTTON_PREV
-#define STOPWATCH_LAP_TIMER BUTTON_PLAY
-#define STOPWATCH_SCROLL_UP BUTTON_HOME
-#define STOPWATCH_SCROLL_DOWN BUTTON_OPTION
-
-#elif CONFIG_KEYPAD == XDUOO_X3II_PAD
-#define STOPWATCH_QUIT BUTTON_POWER
-#define STOPWATCH_START_STOP BUTTON_NEXT
-#define STOPWATCH_RESET_TIMER BUTTON_PREV
-#define STOPWATCH_LAP_TIMER BUTTON_PLAY
-#define STOPWATCH_SCROLL_UP BUTTON_HOME
-#define STOPWATCH_SCROLL_DOWN BUTTON_OPTION
-
-#elif CONFIG_KEYPAD == XDUOO_X20_PAD
+#elif CONFIG_KEYPAD == XDUOO_X3_PAD || CONFIG_KEYPAD == XDUOO_X3II_PAD || CONFIG_KEYPAD == XDUOO_X20_PAD
#define STOPWATCH_QUIT BUTTON_POWER
#define STOPWATCH_START_STOP BUTTON_NEXT
#define STOPWATCH_RESET_TIMER BUTTON_PREV
@@ -309,7 +293,7 @@
#define STOPWATCH_SCROLL_UP BUTTON_HOME
#define STOPWATCH_SCROLL_DOWN BUTTON_OPTION
-#elif CONFIG_KEYPAD == IHIFI_770_PAD
+#elif CONFIG_KEYPAD == IHIFI_770_PAD || CONFIG_KEYPAD == IHIFI_800_PAD
#define STOPWATCH_QUIT BUTTON_POWER
#define STOPWATCH_START_STOP BUTTON_NEXT
#define STOPWATCH_RESET_TIMER BUTTON_PREV
@@ -317,13 +301,13 @@
#define STOPWATCH_SCROLL_UP BUTTON_VOL_UP
#define STOPWATCH_SCROLL_DOWN BUTTON_VOL_DOWN
-#elif CONFIG_KEYPAD == IHIFI_800_PAD
+#elif CONFIG_KEYPAD == EROSQ_PAD
#define STOPWATCH_QUIT BUTTON_POWER
-#define STOPWATCH_START_STOP BUTTON_NEXT
-#define STOPWATCH_RESET_TIMER BUTTON_PREV
-#define STOPWATCH_LAP_TIMER BUTTON_PLAY
-#define STOPWATCH_SCROLL_UP BUTTON_VOL_UP
-#define STOPWATCH_SCROLL_DOWN BUTTON_VOL_DOWN
+#define STOPWATCH_START_STOP BUTTON_PLAY
+#define STOPWATCH_RESET_TIMER BUTTON_BACK
+#define STOPWATCH_LAP_TIMER BUTTON_MENU
+#define STOPWATCH_SCROLL_UP BUTTON_SCROLL_FWD
+#define STOPWATCH_SCROLL_DOWN BUTTON_SCROLL_BACK
#else
#error No keymap defined!
@@ -405,24 +389,24 @@ static void ticks_to_string(int ticks,int lap,int buflen, char * buf)
}
}
-/*
+/*
* Load saved stopwatch state, if exists.
*/
static void load_stopwatch(void)
{
int fd;
-
+
fd = rb->open(STOPWATCH_FILE, O_RDONLY);
-
+
if (fd < 0)
{
return;
}
-
+
/* variable stopwatch isn't saved/loaded, because it is only used
* temporarily in main loop
*/
-
+
rb->read(fd, &start_at, sizeof(start_at));
rb->read(fd, &prev_total, sizeof(prev_total));
rb->read(fd, &counting, sizeof(counting));
@@ -430,7 +414,7 @@ static void load_stopwatch(void)
rb->read(fd, &lap_scroll, sizeof(lap_scroll));
rb->read(fd, &lap_start, sizeof(lap_start));
rb->read(fd, lap_times, sizeof(lap_times));
-
+
if (counting && start_at > *rb->current_tick)
{
/* Stopwatch started in the future? Unlikely; probably started on a
@@ -441,28 +425,28 @@ static void load_stopwatch(void)
start_at = 0;
counting = false;
}
-
+
rb->close(fd);
}
-/*
+/*
* Save stopwatch state.
*/
static void save_stopwatch(void)
{
int fd;
-
+
fd = rb->open(STOPWATCH_FILE, O_CREAT|O_WRONLY|O_TRUNC, 0666);
-
+
if (fd < 0)
{
return;
}
-
+
/* variable stopwatch isn't saved/loaded, because it is only used
* temporarily in main loop
*/
-
+
rb->write(fd, &start_at, sizeof(start_at));
rb->write(fd, &prev_total, sizeof(prev_total));
rb->write(fd, &counting, sizeof(counting));
@@ -470,7 +454,7 @@ static void save_stopwatch(void)
rb->write(fd, &lap_scroll, sizeof(lap_scroll));
rb->write(fd, &lap_start, sizeof(lap_start));
rb->write(fd, lap_times, sizeof(lap_times));
-
+
rb->close(fd);
}
@@ -491,9 +475,9 @@ enum plugin_status plugin_start(const void* parameter)
lines = (LCD_HEIGHT / h) - (LAP_Y);
load_stopwatch();
-
+
rb->lcd_clear_display();
-
+
while (!done)
{
if (counting)
diff --git a/apps/plugins/sudoku/sudoku.h b/apps/plugins/sudoku/sudoku.h
index 749087260d..36f47a377a 100644
--- a/apps/plugins/sudoku/sudoku.h
+++ b/apps/plugins/sudoku/sudoku.h
@@ -404,21 +404,7 @@
#define SUDOKU_BUTTON_MENU (BUTTON_POWER | BUTTON_REL)
#define SUDOKU_BUTTON_POSSIBLE (BUTTON_HOME | BUTTON_PWRALT)
-#elif CONFIG_KEYPAD == XDUOO_X3II_PAD
-#define SUDOKU_BUTTON_QUIT_PRE BUTTON_POWER
-#define SUDOKU_BUTTON_QUIT (BUTTON_POWER | BUTTON_REPEAT)
-#define SUDOKU_BUTTON_UP BUTTON_HOME
-#define SUDOKU_BUTTON_DOWN BUTTON_OPTION
-#define SUDOKU_BUTTON_LEFT BUTTON_PREV
-#define SUDOKU_BUTTON_RIGHT BUTTON_NEXT
-#define SUDOKU_BUTTON_TOGGLEBACK BUTTON_VOL_DOWN
-#define SUDOKU_BUTTON_TOGGLE BUTTON_VOL_UP
-#define SUDOKU_BUTTON_ALTTOGGLE BUTTON_PLAY
-#define SUDOKU_BUTTON_MENU_PRE BUTTON_POWER
-#define SUDOKU_BUTTON_MENU (BUTTON_POWER | BUTTON_REL)
-#define SUDOKU_BUTTON_POSSIBLE (BUTTON_HOME | BUTTON_POWER)
-
-#elif CONFIG_KEYPAD == XDUOO_X20_PAD
+#elif CONFIG_KEYPAD == XDUOO_X3II_PAD || CONFIG_KEYPAD == XDUOO_X20_PAD
#define SUDOKU_BUTTON_QUIT_PRE BUTTON_POWER
#define SUDOKU_BUTTON_QUIT (BUTTON_POWER | BUTTON_REPEAT)
#define SUDOKU_BUTTON_UP BUTTON_HOME
@@ -446,7 +432,7 @@
#define SUDOKU_BUTTON_MENU (BUTTON_POWER | BUTTON_REL)
#define SUDOKU_BUTTON_POSSIBLE (BUTTON_HOME | BUTTON_POWER)
-#elif CONFIG_KEYPAD == IHIFI_770_PAD
+#elif CONFIG_KEYPAD == IHIFI_770_PAD || CONFIG_KEYPAD == IHIFI_800_PAD
#define SUDOKU_BUTTON_QUIT_PRE BUTTON_POWER
#define SUDOKU_BUTTON_QUIT (BUTTON_POWER | BUTTON_REPEAT)
#define SUDOKU_BUTTON_UP BUTTON_PREV
@@ -460,19 +446,18 @@
#define SUDOKU_BUTTON_MENU (BUTTON_POWER | BUTTON_REL)
#define SUDOKU_BUTTON_POSSIBLE (BUTTON_POWER | BUTTON_HOME)
-#elif CONFIG_KEYPAD == IHIFI_800_PAD
+#elif CONFIG_KEYPAD == EROSQ_PAD
#define SUDOKU_BUTTON_QUIT_PRE BUTTON_POWER
#define SUDOKU_BUTTON_QUIT (BUTTON_POWER | BUTTON_REPEAT)
#define SUDOKU_BUTTON_UP BUTTON_PREV
#define SUDOKU_BUTTON_DOWN BUTTON_NEXT
-#define SUDOKU_BUTTON_LEFT BUTTON_HOME
-#define SUDOKU_BUTTON_RIGHT BUTTON_VOL_DOWN
-#define SUDOKU_BUTTON_TOGGLEBACK (BUTTON_POWER | BUTTON_VOL_DOWN)
-#define SUDOKU_BUTTON_TOGGLE (BUTTON_POWER | BUTTON_VOL_UP)
-#define SUDOKU_BUTTON_ALTTOGGLE BUTTON_PLAY
-#define SUDOKU_BUTTON_MENU_PRE BUTTON_POWER
-#define SUDOKU_BUTTON_MENU (BUTTON_POWER | BUTTON_REL)
-#define SUDOKU_BUTTON_POSSIBLE (BUTTON_POWER | BUTTON_HOME)
+#define SUDOKU_BUTTON_LEFT BUTTON_SCROLL_BACK
+#define SUDOKU_BUTTON_RIGHT BUTTON_SCROLL_FWD
+#define SUDOKU_BUTTON_TOGGLEBACK BUTTON_VOL_DOWN
+#define SUDOKU_BUTTON_TOGGLE BUTTON_VOL_UP
+#define SUDOKU_BUTTON_MENU_PRE BUTTON_MENU
+#define SUDOKU_BUTTON_MENU (BUTTON_MENU | BUTTON_REL)
+#define SUDOKU_BUTTON_POSSIBLE BUTTON_BACK
#else
#error No keymap defined!
@@ -512,7 +497,7 @@ struct sudoku_state_t {
char savedboard[9][9]; /* Cached copy of saved state */
int x,y; /* Cursor position */
int editmode; /* We are editing the start board */
-#ifdef SUDOKU_BUTTON_POSSIBLE
+#ifdef SUDOKU_BUTTON_POSSIBLE
short possiblevals[9][9]; /* possible values a cell could be, user sets them */
short savedpossible[9][9]; /* cached copy of possible cell values */
#endif
diff --git a/apps/plugins/text_viewer/tv_button.h b/apps/plugins/text_viewer/tv_button.h
index dea87ebd52..cf3a2b777e 100644
--- a/apps/plugins/text_viewer/tv_button.h
+++ b/apps/plugins/text_viewer/tv_button.h
@@ -545,6 +545,18 @@
#define TV_LINE_DOWN BUTTON_OPTION
#define TV_BOOKMARK (BUTTON_OPTION | BUTTON_PLAY)
+#elif CONFIG_KEYPAD == EROSQ_PAD
+#define TV_MENU BUTTON_MENU
+#define TV_SCROLL_UP BUTTON_SCROLL_BACK
+#define TV_SCROLL_DOWN BUTTON_SCROLL_FWD
+#define TV_SCREEN_LEFT BUTTON_PREV
+#define TV_SCREEN_RIGHT BUTTON_NEXT
+#define TV_AUTOSCROLL BUTTON_PLAY
+#define TV_QUIT BUTTON_POWER
+#define TV_BOOKMARK BUTTON_BACK
+#define TV_LINE_UP BUTTON_VOL_UP
+#define TV_LINE_DOWN BUTTON_VOL_DOWN
+
/* Xuelin 770/770c keys */
#elif CONFIG_KEYPAD == IHIFI_770_PAD
#define TV_QUIT BUTTON_POWER
diff --git a/apps/plugins/vu_meter.c b/apps/plugins/vu_meter.c
index 66ddf03dd8..80e1960fad 100644
--- a/apps/plugins/vu_meter.c
+++ b/apps/plugins/vu_meter.c
@@ -397,18 +397,7 @@
#define LABEL_MENU "PLAY"
#define LABEL_VOLUME "VOL UP/DN"
-#elif (CONFIG_KEYPAD == XDUOO_X3II_PAD)
-#define VUMETER_QUIT BUTTON_POWER
-#define VUMETER_HELP BUTTON_HOME
-#define VUMETER_MENU BUTTON_PLAY
-#define VUMETER_UP BUTTON_VOL_UP
-#define VUMETER_DOWN BUTTON_VOL_DOWN
-#define LABEL_HELP "HOME"
-#define LABEL_QUIT "POWER"
-#define LABEL_MENU "PLAY"
-#define LABEL_VOLUME "VOL UP/DN"
-
-#elif (CONFIG_KEYPAD == XDUOO_X20_PAD)
+#elif (CONFIG_KEYPAD == XDUOO_X3II_PAD) || (CONFIG_KEYPAD == XDUOO_X20_PAD)
#define VUMETER_QUIT BUTTON_POWER
#define VUMETER_HELP BUTTON_HOME
#define VUMETER_MENU BUTTON_PLAY
@@ -430,7 +419,7 @@
#define LABEL_MENU "PLAY"
#define LABEL_VOLUME "VOL UP/DN"
-#elif (CONFIG_KEYPAD == IHIFI_770_PAD)
+#elif (CONFIG_KEYPAD == IHIFI_770_PAD) || (CONFIG_KEYPAD == IHIFI_800_PAD)
#define VUMETER_QUIT BUTTON_POWER
#define VUMETER_HELP BUTTON_HOME
#define VUMETER_MENU BUTTON_PLAY
@@ -441,15 +430,15 @@
#define LABEL_MENU "PLAY"
#define LABEL_VOLUME "VOL UP/DN"
-#elif (CONFIG_KEYPAD == IHIFI_800_PAD)
+#elif (CONFIG_KEYPAD == EROSQ_PAD)
#define VUMETER_QUIT BUTTON_POWER
-#define VUMETER_HELP BUTTON_HOME
-#define VUMETER_MENU BUTTON_PLAY
+#define VUMETER_HELP BUTTON_BACK
+#define VUMETER_MENU BUTTON_MENU
#define VUMETER_UP BUTTON_VOL_UP
#define VUMETER_DOWN BUTTON_VOL_DOWN
-#define LABEL_HELP "HOME"
+#define LABEL_HELP "BACK"
#define LABEL_QUIT "POWER"
-#define LABEL_MENU "PLAY"
+#define LABEL_MENU "MENU"
#define LABEL_VOLUME "VOL UP/DN"
#else
@@ -551,7 +540,7 @@ struct saved_settings {
bool analog_minimeters;
bool digital_minimeters;
int analog_decay;
- int digital_decay;
+ int digital_decay;
} vumeter_settings;
static void reset_settings(void) {
@@ -561,7 +550,7 @@ static void reset_settings(void) {
vumeter_settings.analog_minimeters=true;
vumeter_settings.digital_minimeters=false;
vumeter_settings.analog_decay=3;
- vumeter_settings.digital_decay=0;
+ vumeter_settings.digital_decay=0;
}
static void calc_scales(void)
@@ -639,11 +628,11 @@ static bool vu_meter_menu(void)
int selection;
bool menu_quit = false;
bool exit = false;
-
+
MENUITEM_STRINGLIST(menu,"VU Meter Menu",NULL,"Meter Type","Scale",
"Minimeters","Decay Speed","Playback Control",
"Quit");
-
+
static const struct opt_items meter_type_option[2] = {
{ "Analog", -1 },
{ "Digital", -1 },
@@ -666,7 +655,7 @@ static bool vu_meter_menu(void)
rb->set_option("Meter Type", &vumeter_settings.meter_type, INT,
meter_type_option, 2, NULL);
break;
-
+
case 1:
if(vumeter_settings.meter_type==ANALOG)
{
@@ -679,7 +668,7 @@ static bool vu_meter_menu(void)
"dBfs", -1, "Linear", -1, NULL);
}
break;
-
+
case 2:
if(vumeter_settings.meter_type==ANALOG)
{
@@ -692,16 +681,16 @@ static bool vu_meter_menu(void)
&vumeter_settings.digital_minimeters);
}
break;
-
+
case 3:
if(vumeter_settings.meter_type==ANALOG)
{
- rb->set_option("Decay Speed", &vumeter_settings.analog_decay, INT,
+ rb->set_option("Decay Speed", &vumeter_settings.analog_decay, INT,
decay_speed_option, 7, NULL);
}
else
{
- rb->set_option("Decay Speed", &vumeter_settings.digital_decay, INT,
+ rb->set_option("Decay Speed", &vumeter_settings.digital_decay, INT,
decay_speed_option, 7, NULL);
}
break;
@@ -779,7 +768,7 @@ static void draw_digital_minimeters(void) {
if(8<(num_right_leds))
rb->lcd_mono_bitmap(sound_max_level, 46, half_height+8, 3, 8);
rb->lcd_set_drawmode(DRMODE_SOLID);
-
+
#ifdef HAVE_LCD_COLOR
rb->lcd_set_foreground(screen_foreground);
#endif
@@ -880,10 +869,10 @@ static void digital_meter(void) {
rb->lcd_set_foreground(LCD_RGBPACK(255, 255 - 23 * i, 0));
#endif
rb->lcd_fillrect((digital_lead + (i*digital_block_width)),
- (half_height + 20), digital_block_width - digital_block_gap,
+ (half_height + 20), digital_block_width - digital_block_gap,
digital_block_height);
}
-
+
#ifdef HAVE_LCD_COLOR
rb->lcd_set_foreground(screen_foreground);
#endif
diff --git a/apps/plugins/wormlet.c b/apps/plugins/wormlet.c
index 6cf03dfaff..e4286f35b4 100644
--- a/apps/plugins/wormlet.c
+++ b/apps/plugins/wormlet.c
@@ -362,16 +362,7 @@ CONFIG_KEYPAD == MROBE500_PAD
#define BTN_QUIT BUTTON_POWER
#define BTN_STOPRESET (BUTTON_HOME | BUTTON_PWRALT)
-#elif CONFIG_KEYPAD == XDUOO_X3II_PAD
-#define BTN_DIR_UP BUTTON_HOME
-#define BTN_DIR_DOWN BUTTON_OPTION
-#define BTN_DIR_LEFT BUTTON_PREV
-#define BTN_DIR_RIGHT BUTTON_NEXT
-#define BTN_STARTPAUSE BUTTON_PLAY
-#define BTN_QUIT BUTTON_POWER
-#define BTN_STOPRESET (BUTTON_HOME | BUTTON_POWER)
-
-#elif CONFIG_KEYPAD == XDUOO_X20_PAD
+#elif CONFIG_KEYPAD == XDUOO_X3II_PAD || CONFIG_KEYPAD == XDUOO_X20_PAD
#define BTN_DIR_UP BUTTON_HOME
#define BTN_DIR_DOWN BUTTON_OPTION
#define BTN_DIR_LEFT BUTTON_PREV
@@ -389,7 +380,7 @@ CONFIG_KEYPAD == MROBE500_PAD
#define BTN_QUIT BUTTON_POWER
#define BTN_STOPRESET (BUTTON_HOME | BUTTON_POWER)
-#elif CONFIG_KEYPAD == IHIFI_770_PAD
+#elif CONFIG_KEYPAD == IHIFI_770_PAD || CONFIG_KEYPAD == IHIFI_800_PAD
#define BTN_DIR_UP BUTTON_PREV
#define BTN_DIR_DOWN BUTTON_NEXT
#define BTN_DIR_LEFT BUTTON_HOME
@@ -398,14 +389,14 @@ CONFIG_KEYPAD == MROBE500_PAD
#define BTN_QUIT BUTTON_POWER
#define BTN_STOPRESET BUTTON_VOL_UP
-#elif CONFIG_KEYPAD == IHIFI_800_PAD
+#elif CONFIG_KEYPAD == EROSQ_PAD
#define BTN_DIR_UP BUTTON_PREV
#define BTN_DIR_DOWN BUTTON_NEXT
-#define BTN_DIR_LEFT BUTTON_HOME
-#define BTN_DIR_RIGHT BUTTON_VOL_DOWN
+#define BTN_DIR_LEFT BUTTON_SCROLL_BACK
+#define BTN_DIR_RIGHT BUTTON_SCROLL_FWD
#define BTN_STARTPAUSE BUTTON_PLAY
#define BTN_QUIT BUTTON_POWER
-#define BTN_STOPRESET BUTTON_VOL_UP
+#define BTN_STOPRESET BUTTON_BACK
#else
#error No keymap defined!
diff --git a/apps/plugins/xobox.c b/apps/plugins/xobox.c
index 94161c683d..f60938e900 100644
--- a/apps/plugins/xobox.c
+++ b/apps/plugins/xobox.c
@@ -315,25 +315,7 @@ CONFIG_KEYPAD == MROBE500_PAD
#define DOWN BUTTON_DOWN
#define PAUSE BUTTON_SELECT
-#elif CONFIG_KEYPAD == XDUOO_X3_PAD
-
-#define QUIT BUTTON_POWER
-#define LEFT BUTTON_PREV
-#define RIGHT BUTTON_NEXT
-#define UP BUTTON_HOME
-#define DOWN BUTTON_OPTION
-#define PAUSE BUTTON_PLAY
-
-#elif CONFIG_KEYPAD == XDUOO_X3II_PAD
-
-#define QUIT BUTTON_POWER
-#define LEFT BUTTON_PREV
-#define RIGHT BUTTON_NEXT
-#define UP BUTTON_HOME
-#define DOWN BUTTON_OPTION
-#define PAUSE BUTTON_PLAY
-
-#elif CONFIG_KEYPAD == XDUOO_X20_PAD
+#elif CONFIG_KEYPAD == XDUOO_X3_PAD || CONFIG_KEYPAD == XDUOO_X3II_PAD || CONFIG_KEYPAD == XDUOO_X20_PAD
#define QUIT BUTTON_POWER
#define LEFT BUTTON_PREV
@@ -351,7 +333,7 @@ CONFIG_KEYPAD == MROBE500_PAD
#define DOWN BUTTON_OPTION
#define PAUSE BUTTON_PLAY
-#elif CONFIG_KEYPAD == IHIFI_770_PAD
+#elif CONFIG_KEYPAD == IHIFI_770_PAD || CONFIG_KEYPAD == IHIFI_800_PAD
#define QUIT BUTTON_POWER
#define LEFT BUTTON_HOME
@@ -360,20 +342,16 @@ CONFIG_KEYPAD == MROBE500_PAD
#define DOWN BUTTON_NEXT
#define PAUSE BUTTON_PLAY
-#elif CONFIG_KEYPAD == IHIFI_800_PAD
+#elif CONFIG_KEYPAD == EROSQ_PAD
#define QUIT BUTTON_POWER
-#define LEFT BUTTON_HOME
-#define RIGHT BUTTON_VOL_DOWN
+#define LEFT BUTTON_SCROLL_BACK
+#define RIGHT BUTTON_SCROLL_FWD
#define UP BUTTON_PREV
#define DOWN BUTTON_NEXT
#define PAUSE BUTTON_PLAY
-#else
-#error No keymap defined!
-#endif
-
-#ifdef HAVE_TOUCHSCREEN
+#elif defined(HAVE_TOUCHSCREEN)
#ifndef QUIT
#define QUIT BUTTON_TOPLEFT
#endif
@@ -392,6 +370,8 @@ CONFIG_KEYPAD == MROBE500_PAD
#ifndef PAUSE
#define PAUSE BUTTON_CENTER
#endif
+#else
+#error No keymap defined!
#endif
#define MOVE_NO 0 /* player movement */
@@ -734,7 +714,7 @@ static void refresh_board (void)
#else
x = BOARD_X + CUBE_SIZE * BOARD_W - 40;
#endif
- rb->lcd_putsxyf (x, BOARD_Y + CUBE_SIZE * BOARD_H - 8,
+ rb->lcd_putsxyf (x, BOARD_Y + CUBE_SIZE * BOARD_H - 8,
(player.lives != 1) ? "%d Lives" : "%d Life", player.lives);
#if LCD_DEPTH>=2
@@ -1160,7 +1140,7 @@ static int xobox_menu_cb(int action,
static int xobox_menu(bool ingame)
{
rb->button_clear_queue();
-
+
int selection = 0;
MENUITEM_STRINGLIST(main_menu, "Xobox Menu", xobox_menu_cb,
"Resume Game", "Start New Game",
diff --git a/apps/plugins/zxbox/keymaps.h b/apps/plugins/zxbox/keymaps.h
index eae20e7976..6c0fac6ddf 100644
--- a/apps/plugins/zxbox/keymaps.h
+++ b/apps/plugins/zxbox/keymaps.h
@@ -266,15 +266,7 @@
#define ZX_UP BUTTON_HOME
#define ZX_DOWN BUTTON_OPTION
-#elif CONFIG_KEYPAD == XDUOO_X3II_PAD
-#define ZX_SELECT BUTTON_PLAY
-#define ZX_MENU BUTTON_POWER
-#define ZX_LEFT BUTTON_PREV
-#define ZX_RIGHT BUTTON_NEXT
-#define ZX_UP BUTTON_HOME
-#define ZX_DOWN BUTTON_OPTION
-
-#elif CONFIG_KEYPAD == XDUOO_X20_PAD
+#elif CONFIG_KEYPAD == XDUOO_X3II_PAD || CONFIG_KEYPAD == XDUOO_X20_PAD
#define ZX_SELECT BUTTON_PLAY
#define ZX_MENU BUTTON_POWER
#define ZX_LEFT BUTTON_PREV
@@ -290,7 +282,7 @@
#define ZX_UP BUTTON_HOME
#define ZX_DOWN BUTTON_OPTION
-#elif CONFIG_KEYPAD == IHIFI_770_PAD
+#elif CONFIG_KEYPAD == IHIFI_770_PAD || CONFIG_KEYPAD == IHIFI_800_PAD
#define ZX_SELECT BUTTON_PLAY
#define ZX_MENU BUTTON_POWER
#define ZX_LEFT BUTTON_HOME
@@ -298,11 +290,11 @@
#define ZX_UP BUTTON_PREV
#define ZX_DOWN BUTTON_NEXT
-#elif CONFIG_KEYPAD == IHIFI_800_PAD
+#elif CONFIG_KEYPAD == EROSQ_PAD
#define ZX_SELECT BUTTON_PLAY
-#define ZX_MENU BUTTON_POWER
-#define ZX_LEFT BUTTON_HOME
-#define ZX_RIGHT BUTTON_VOL_DOWN
+#define ZX_MENU BUTTON_MENU
+#define ZX_LEFT BUTTON_SCROLL_BACK
+#define ZX_RIGHT BUTTON_SCROLL_FWD
#define ZX_UP BUTTON_PREV
#define ZX_DOWN BUTTON_NEXT
diff --git a/apps/plugins/zxbox/zxbox_keyb.c b/apps/plugins/zxbox/zxbox_keyb.c
index c16c3cd20a..f77ce538d1 100644
--- a/apps/plugins/zxbox/zxbox_keyb.c
+++ b/apps/plugins/zxbox/zxbox_keyb.c
@@ -36,7 +36,7 @@
/* TODO: Check keyboard mappings */
-#define KBD_SELECT BUTTON_SELECT
+#define KBD_SELECT BUTTON_SELECT
#define KBD_ABORT BUTTON_PLAY
#define KBD_LEFT BUTTON_LEFT
#define KBD_RIGHT BUTTON_RIGHT
@@ -257,16 +257,7 @@
#define KBD_UP BUTTON_HOME
#define KBD_DOWN BUTTON_OPTION
-#elif CONFIG_KEYPAD == XDUOO_X3II_PAD
-
-#define KBD_SELECT BUTTON_PLAY
-#define KBD_ABORT BUTTON_POWER
-#define KBD_LEFT BUTTON_PREV
-#define KBD_RIGHT BUTTON_NEXT
-#define KBD_UP BUTTON_HOME
-#define KBD_DOWN BUTTON_OPTION
-
-#elif CONFIG_KEYPAD == XDUOO_X20_PAD
+#elif CONFIG_KEYPAD == XDUOO_X3II_PAD || CONFIG_KEYPAD == XDUOO_X20_PAD
#define KBD_SELECT BUTTON_PLAY
#define KBD_ABORT BUTTON_POWER
@@ -284,7 +275,7 @@
#define KBD_UP BUTTON_HOME
#define KBD_DOWN BUTTON_OPTION
-#elif CONFIG_KEYPAD == IHIFI_770_PAD
+#elif CONFIG_KEYPAD == IHIFI_770_PAD || CONFIG_KEYPAD == IHIFI_800_PAD
#define KBD_SELECT BUTTON_PLAY
#define KBD_ABORT BUTTON_POWER
@@ -293,12 +284,12 @@
#define KBD_UP BUTTON_PREV
#define KBD_DOWN BUTTON_NEXT
-#elif CONFIG_KEYPAD == IHIFI_800_PAD
+#elif CONFIG_KEYPAD == EROSQ_PAD
#define KBD_SELECT BUTTON_PLAY
-#define KBD_ABORT BUTTON_POWER
-#define KBD_LEFT BUTTON_HOME
-#define KBD_RIGHT BUTTON_VOL_DOWN
+#define KBD_ABORT BUTTON_BACK
+#define KBD_LEFT BUTTON_SCROLL_BACK
+#define KBD_RIGHT BUTTON_SCROLL_FWD
#define KBD_UP BUTTON_PREV
#define KBD_DOWN BUTTON_NEXT
@@ -581,7 +572,7 @@ int zx_kbd_input(char* text/*, int buflen*/)
}
cur_blink = !cur_blink;
-
+
/* highlight the key that has focus */
FOR_NB_SCREENS(l)
{
@@ -591,7 +582,7 @@ int zx_kbd_input(char* text/*, int buflen*/)
param[l].font_w, param[l].font_h);
rb->screens[l]->set_drawmode(DRMODE_SOLID);
}
-
+
FOR_NB_SCREENS(l)
rb->screens[l]->update();
@@ -687,7 +678,7 @@ int zx_kbd_input(char* text/*, int buflen*/)
char_screen = 0;
/* inserts the selected char */
-
+
/* find input char */
k = (param[char_screen].page*param[char_screen].lines +
param[char_screen].y)*param[char_screen].max_chars +