summaryrefslogtreecommitdiffstats
path: root/apps/plugins
diff options
context:
space:
mode:
authorWilliam Wilgus <wilgus.william@gmail.com>2020-09-12 05:03:12 -0400
committerWilliam Wilgus <me.theuser@yahoo.com>2020-09-13 16:23:24 +0000
commitc62493e98adfd27c16eb2adb2ecd22716813b705 (patch)
treec5d2a0fbdcf145584518289885e7676f82b20a29 /apps/plugins
parent6b674a6a0a347bd4cb946b37b6e075dc2715f7ac (diff)
downloadrockbox-c62493e98adfd27c16eb2adb2ecd22716813b705.tar.gz
rockbox-c62493e98adfd27c16eb2adb2ecd22716813b705.tar.bz2
rockbox-c62493e98adfd27c16eb2adb2ecd22716813b705.zip
Xduoo X3 Add tree scrolling FS#13240, Emulate Multibutton presses
Fixes deficiencies with the button system on the X3 The x3 has an interesting button layout. Multiple key presses are NOT supported unless [BUTTON_POWER] is one of the combined keys As you can imagine this causes problems as the power button takes precedence in the button system and initiates a shutdown if the key is held too long instead of BUTTON_POWER use BUTTON_PWRALT in combination with other keys IF using as a prerequsite button then BUTTON_POWER should be used Multiple buttons are emulated by button_read_device but there are a few caveats to be aware of: Button Order Matters! different keys have different priorities, higher priority keys 'overide' the lower priority keys VOLUP[7] VOLDN[6] PREV[5] NEXT[4] PLAY[3] OPTION[2] HOME[1] There will be no true release or repeat events, the user can let off the button pressed initially and it will still continue to appear to be pressed as long as the second key is held Tree scrolling is PLAY+NEXT or PLAY+PREV Change-Id: I88dfee1c70a6a99659e8227f5becacc50cc43910
Diffstat (limited to 'apps/plugins')
-rw-r--r--apps/plugins/doom/i_video.c2
-rw-r--r--apps/plugins/fft/fft.c2
-rw-r--r--apps/plugins/goban/goban.h2
-rw-r--r--apps/plugins/imageviewer/imageviewer_button.h2
-rw-r--r--apps/plugins/pegbox.c2
-rw-r--r--apps/plugins/rockpaint.c2
-rw-r--r--apps/plugins/sliding_puzzle.c2
-rw-r--r--apps/plugins/sokoban.c2
-rw-r--r--apps/plugins/sudoku/sudoku.h2
-rw-r--r--apps/plugins/text_viewer/tv_button.h2
-rw-r--r--apps/plugins/wormlet.c2
11 files changed, 11 insertions, 11 deletions
diff --git a/apps/plugins/doom/i_video.c b/apps/plugins/doom/i_video.c
index 9f367d7d76..fb328639bf 100644
--- a/apps/plugins/doom/i_video.c
+++ b/apps/plugins/doom/i_video.c
@@ -561,7 +561,7 @@ void I_ShutdownGraphics(void)
#define DOOMBUTTON_LEFT BUTTON_PREV
#define DOOMBUTTON_RIGHT BUTTON_NEXT
#define DOOMBUTTON_SHOOT BUTTON_PLAY
-#define DOOMBUTTON_OPEN (BUTTON_HOME | BUTTON_POWER)
+#define DOOMBUTTON_OPEN (BUTTON_HOME | BUTTON_PWRALT)
#define DOOMBUTTON_ESC BUTTON_POWER
#define DOOMBUTTON_ENTER BUTTON_PLAY
#define DOOMBUTTON_WEAPON BUTTON_VOL_UP
diff --git a/apps/plugins/fft/fft.c b/apps/plugins/fft/fft.c
index 9edb02a15e..2ed0263d75 100644
--- a/apps/plugins/fft/fft.c
+++ b/apps/plugins/fft/fft.c
@@ -330,7 +330,7 @@ GREY_INFO_STRUCT
# 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_WINDOW (BUTTON_HOME|BUTTON_PWRALT)
# define FFT_AMP_SCALE BUTTON_PLAY
# define FFT_QUIT BUTTON_POWER
diff --git a/apps/plugins/goban/goban.h b/apps/plugins/goban/goban.h
index 8406b540b7..ac02d74f50 100644
--- a/apps/plugins/goban/goban.h
+++ b/apps/plugins/goban/goban.h
@@ -441,7 +441,7 @@
#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
+#define GBN_BUTTON_NEXT_VAR BUTTON_HOME | BUTTON_PWRALT
#elif (CONFIG_KEYPAD == XDUOO_X3II_PAD)
#define GBN_BUTTON_UP BUTTON_HOME
diff --git a/apps/plugins/imageviewer/imageviewer_button.h b/apps/plugins/imageviewer/imageviewer_button.h
index 46813d5e69..7aa96023c6 100644
--- a/apps/plugins/imageviewer/imageviewer_button.h
+++ b/apps/plugins/imageviewer/imageviewer_button.h
@@ -474,7 +474,7 @@
#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_SLIDE_SHOW (BUTTON_HOME|BUTTON_PWRALT)
#elif CONFIG_KEYPAD == XDUOO_X3II_PAD
#define IMGVIEW_ZOOM_PRE BUTTON_PLAY
diff --git a/apps/plugins/pegbox.c b/apps/plugins/pegbox.c
index 4622d2a10e..0a299c995f 100644
--- a/apps/plugins/pegbox.c
+++ b/apps/plugins/pegbox.c
@@ -612,7 +612,7 @@ CONFIG_KEYPAD == MROBE500_PAD
#elif CONFIG_KEYPAD == XDUOO_X3_PAD
#define PEGBOX_SELECT BUTTON_PLAY
#define PEGBOX_QUIT BUTTON_POWER
-#define PEGBOX_RESTART (BUTTON_POWER | BUTTON_HOME)
+#define PEGBOX_RESTART (BUTTON_PWRALT | BUTTON_HOME)
#define PEGBOX_LVL_UP BUTTON_VOL_UP
#define PEGBOX_LVL_DOWN BUTTON_VOL_DOWN
#define PEGBOX_UP BUTTON_HOME
diff --git a/apps/plugins/rockpaint.c b/apps/plugins/rockpaint.c
index 35d2f21ba7..8e4df10280 100644
--- a/apps/plugins/rockpaint.c
+++ b/apps/plugins/rockpaint.c
@@ -330,7 +330,7 @@
#elif CONFIG_KEYPAD == XDUOO_X3_PAD
#define ROCKPAINT_QUIT BUTTON_POWER
#define ROCKPAINT_DRAW BUTTON_PLAY
-#define ROCKPAINT_MENU (BUTTON_HOME | BUTTON_POWER)
+#define ROCKPAINT_MENU (BUTTON_HOME | BUTTON_PWRALT)
#define ROCKPAINT_TOOLBAR BUTTON_VOL_UP
#define ROCKPAINT_TOOLBAR2 BUTTON_VOL_DOWN
#define ROCKPAINT_UP BUTTON_HOME
diff --git a/apps/plugins/sliding_puzzle.c b/apps/plugins/sliding_puzzle.c
index 1a77eda721..e8d349defd 100644
--- a/apps/plugins/sliding_puzzle.c
+++ b/apps/plugins/sliding_puzzle.c
@@ -309,7 +309,7 @@ CONFIG_KEYPAD == MROBE500_PAD
#define PUZZLE_RIGHT BUTTON_NEXT
#define PUZZLE_UP BUTTON_HOME
#define PUZZLE_DOWN BUTTON_OPTION
-#define PUZZLE_SHUFFLE (BUTTON_HOME | BUTTON_POWER)
+#define PUZZLE_SHUFFLE (BUTTON_HOME | BUTTON_PWRALT)
#define PUZZLE_PICTURE BUTTON_PLAY
#elif (CONFIG_KEYPAD == XDUOO_X3II_PAD)
diff --git a/apps/plugins/sokoban.c b/apps/plugins/sokoban.c
index 3cc1555e83..08359d9fcc 100644
--- a/apps/plugins/sokoban.c
+++ b/apps/plugins/sokoban.c
@@ -623,7 +623,7 @@
#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_REDO (BUTTON_PWRALT | BUTTON_PLAY)
#define SOKOBAN_LEVEL_DOWN BUTTON_VOL_DOWN
#define SOKOBAN_LEVEL_REPEAT (BUTTON_PLAY | BUTTON_NEXT)
#define SOKOBAN_LEVEL_UP BUTTON_VOL_UP
diff --git a/apps/plugins/sudoku/sudoku.h b/apps/plugins/sudoku/sudoku.h
index d1eca7fcd4..434223ef68 100644
--- a/apps/plugins/sudoku/sudoku.h
+++ b/apps/plugins/sudoku/sudoku.h
@@ -402,7 +402,7 @@
#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)
+#define SUDOKU_BUTTON_POSSIBLE (BUTTON_HOME | BUTTON_PWRALT)
#elif CONFIG_KEYPAD == XDUOO_X3II_PAD
#define SUDOKU_BUTTON_QUIT_PRE BUTTON_POWER
diff --git a/apps/plugins/text_viewer/tv_button.h b/apps/plugins/text_viewer/tv_button.h
index 4f7634e844..6fcfc24e4f 100644
--- a/apps/plugins/text_viewer/tv_button.h
+++ b/apps/plugins/text_viewer/tv_button.h
@@ -504,7 +504,7 @@
#define TV_SCREEN_LEFT BUTTON_PREV
#define TV_SCREEN_RIGHT BUTTON_NEXT
#define TV_MENU BUTTON_PLAY
-#define TV_AUTOSCROLL (BUTTON_POWER | BUTTON_HOME)
+#define TV_AUTOSCROLL (BUTTON_PWRALT | BUTTON_HOME)
#define TV_LINE_UP BUTTON_HOME
#define TV_LINE_DOWN BUTTON_OPTION
#define TV_BOOKMARK (BUTTON_OPTION | BUTTON_PLAY)
diff --git a/apps/plugins/wormlet.c b/apps/plugins/wormlet.c
index 419b258fe5..59f3138c0a 100644
--- a/apps/plugins/wormlet.c
+++ b/apps/plugins/wormlet.c
@@ -360,7 +360,7 @@ CONFIG_KEYPAD == MROBE500_PAD
#define BTN_DIR_RIGHT BUTTON_NEXT
#define BTN_STARTPAUSE BUTTON_PLAY
#define BTN_QUIT BUTTON_POWER
-#define BTN_STOPRESET (BUTTON_HOME | BUTTON_POWER)
+#define BTN_STOPRESET (BUTTON_HOME | BUTTON_PWRALT)
#elif CONFIG_KEYPAD == XDUOO_X3II_PAD
#define BTN_DIR_UP BUTTON_HOME