Rockbox Development > New Ports
Creative Zen X-Fi 2 -- DOOM! keymap problems
(1/1)
cela:
While looking around the source code noticed that the plugins are not enabled, at first I thought it was due to not having any keymaps. It seems that there are touchscreen keymaps they are just not getting applied by the code:-
--- Code: ---#define DOOMBUTTON_MAP BUTTON_MENU
#elif CONFIG_KEYPAD == DX50_PAD
#define DOOMBUTTON_ESC BUTTON_POWER
#define DOOMBUTTON_SHOOT BUTTON_VOL_UP
#define DOOMBUTTON_WEAPON BUTTON_VOL_DOWN
#define DOOMBUTTON_MAP BUTTON_PLAY
#else
#error Keymap not defined!
#endif
#ifdef HAVE_TOUCHSCREEN
#ifndef DOOMBUTTON_UP
#define DOOMBUTTON_UP BUTTON_TOPMIDDLE
#endif
#ifndef DOOMBUTTON_DOWN
#define DOOMBUTTON_DOWN BUTTON_BOTTOMMIDDLE
--- End code ---
However if I just move the touchscreen keymap up (before the Keymap not defined!) they get compiled and work as intended:-
--- Code: ---#define DOOMBUTTON_MAP BUTTON_MENU
#elif CONFIG_KEYPAD == DX50_PAD
#define DOOMBUTTON_ESC BUTTON_POWER
#define DOOMBUTTON_SHOOT BUTTON_VOL_UP
#define DOOMBUTTON_WEAPON BUTTON_VOL_DOWN
#define DOOMBUTTON_MAP BUTTON_PLAY
#elif CONFIG_KEYPAD == CREATIVE_ZENXFI2_PAD
#define DOOMBUTTON_UP BUTTON_TOPMIDDLE
#define DOOMBUTTON_DOWN BUTTON_BOTTOMMIDDLE
#define DOOMBUTTON_LEFT BUTTON_MIDLEFT
#define DOOMBUTTON_RIGHT BUTTON_MIDRIGHT
#define DOOMBUTTON_SHOOT BUTTON_BOTTOMRIGHT
#define DOOMBUTTON_OPEN BUTTON_TOPRIGHT
#define DOOMBUTTON_ESC BUTTON_TOPLEFT
#define DOOMBUTTON_ENTER BUTTON_CENTER
#define DOOMBUTTON_WEAPON BUTTON_BOTTOMLEFT
#else
#error Keymap not defined!
#endif
--- End code ---
cela:
For the most part these plug-in keymaps are easy to fix.
All it needs in most cases since the touchpad is already configured is a one line change like this :-
--- Code: ---#elif CONFIG_KEYPAD == CREATIVE_ZENXFI2_PAD
#else
#error No keymap defined!
#endif
--- End code ---
or in a few cases where there are one or 2 missing keys like this:-
--- Code: ---#elif CONFIG_KEYPAD == CREATIVE_ZENXFI2_PAD
#ifndef BJACK_QUIT
#define BJACK_QUIT BUTTON_POWER
#define BJACK_QUIT_NAME "BUTTON_POWER"
#endif
#else
#error No keymap defined!
#endif
--- End code ---
ulmutul:
Making keymaps is mostly an easy, but nevertheless tedious task, regarding the hundreds of plugins we have ;)
Having said that you sometimes run into unexpected deeper problems.
However I enabled plugins and hopefully didn't forget an important keymap. Here's the link to the patch: http://gerrit.rockbox.org/r/#/c/1823/
Feel free to test and comment on it.
Navigation
[0] Message Index
Go to full version