From c62493e98adfd27c16eb2adb2ecd22716813b705 Mon Sep 17 00:00:00 2001 From: William Wilgus Date: Sat, 12 Sep 2020 05:03:12 -0400 Subject: 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 --- apps/plugins/doom/i_video.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'apps/plugins/doom') 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 -- cgit v1.2.3