summaryrefslogtreecommitdiff
path: root/apps/plugins/zxbox
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins/zxbox')
-rw-r--r--apps/plugins/zxbox/keymaps.h18
-rw-r--r--apps/plugins/zxbox/zxbox_keyb.c28
2 files changed, 4 insertions, 42 deletions
diff --git a/apps/plugins/zxbox/keymaps.h b/apps/plugins/zxbox/keymaps.h
index c2d434415c..967b979883 100644
--- a/apps/plugins/zxbox/keymaps.h
+++ b/apps/plugins/zxbox/keymaps.h
@@ -47,24 +47,8 @@
47#define ZX_SELECT BUTTON_SELECT 47#define ZX_SELECT BUTTON_SELECT
48#define ZX_MENU BUTTON_PLAY 48#define ZX_MENU BUTTON_PLAY
49 49
50#elif CONFIG_KEYPAD == RECORDER_PAD
51#define ZX_SELECT BUTTON_PLAY
52#define ZX_MENU BUTTON_F1
53#define ZX_LEFT BUTTON_LEFT
54#define ZX_RIGHT BUTTON_RIGHT
55#define ZX_UP BUTTON_UP
56#define ZX_DOWN BUTTON_DOWN
57
58#elif CONFIG_KEYPAD == ONDIO_PAD
59#define ZX_SELECT BUTTON_MENU
60#define ZX_MENU BUTTON_OFF
61#define ZX_LEFT BUTTON_LEFT
62#define ZX_RIGHT BUTTON_RIGHT
63#define ZX_UP BUTTON_UP
64#define ZX_DOWN BUTTON_DOWN
65
66#elif CONFIG_KEYPAD == IRIVER_IFP7XX_PAD 50#elif CONFIG_KEYPAD == IRIVER_IFP7XX_PAD
67#define ZX_SELECT BUTTON_SELECT 51#define ZX_SELECT BUTTON_SELECT
68#define ZX_MENU BUTTON_PLAY 52#define ZX_MENU BUTTON_PLAY
69#define ZX_LEFT BUTTON_LEFT 53#define ZX_LEFT BUTTON_LEFT
70#define ZX_RIGHT BUTTON_RIGHT 54#define ZX_RIGHT BUTTON_RIGHT
diff --git a/apps/plugins/zxbox/zxbox_keyb.c b/apps/plugins/zxbox/zxbox_keyb.c
index 046f07379d..4dc50e2ae8 100644
--- a/apps/plugins/zxbox/zxbox_keyb.c
+++ b/apps/plugins/zxbox/zxbox_keyb.c
@@ -7,12 +7,6 @@
7#define O_BINARY 0 7#define O_BINARY 0
8#endif 8#endif
9 9
10#if CONFIG_KEYPAD == RECORDER_PAD
11#define BUTTONBAR_HEIGHT 8
12#else
13#define BUTTONBAR_HEIGHT 0
14#endif
15
16#define DEFAULT_MARGIN 6 10#define DEFAULT_MARGIN 6
17#define KBD_BUF_SIZE 500 11#define KBD_BUF_SIZE 500
18#define kbd_loaded false 12#define kbd_loaded false
@@ -27,22 +21,6 @@
27#define KBD_UP BUTTON_UP 21#define KBD_UP BUTTON_UP
28#define KBD_DOWN BUTTON_DOWN 22#define KBD_DOWN BUTTON_DOWN
29 23
30#elif CONFIG_KEYPAD == RECORDER_PAD
31#define KBD_SELECT BUTTON_PLAY
32#define KBD_ABORT BUTTON_OFF
33#define KBD_LEFT BUTTON_LEFT
34#define KBD_RIGHT BUTTON_RIGHT
35#define KBD_UP BUTTON_UP
36#define KBD_DOWN BUTTON_DOWN
37
38#elif CONFIG_KEYPAD == ONDIO_PAD /* restricted Ondio keypad */
39#define KBD_SELECT BUTTON_MENU
40#define KBD_ABORT BUTTON_OFF
41#define KBD_LEFT BUTTON_LEFT
42#define KBD_RIGHT BUTTON_RIGHT
43#define KBD_UP BUTTON_UP
44#define KBD_DOWN BUTTON_DOWN
45
46#elif (CONFIG_KEYPAD == IPOD_4G_PAD) || \ 24#elif (CONFIG_KEYPAD == IPOD_4G_PAD) || \
47 (CONFIG_KEYPAD == IPOD_3G_PAD) || \ 25 (CONFIG_KEYPAD == IPOD_3G_PAD) || \
48 (CONFIG_KEYPAD == IPOD_1G2G_PAD) 26 (CONFIG_KEYPAD == IPOD_1G2G_PAD)
@@ -412,7 +390,7 @@ int zx_kbd_input(char* text/*, int buflen*/)
412 param[l].font_h = param[l].font->height; 390 param[l].font_h = param[l].font->height;
413 391
414 /* check if FONT_UI fits the screen */ 392 /* check if FONT_UI fits the screen */
415 if (2*param[l].font_h+3 + BUTTONBAR_HEIGHT > 393 if (2*param[l].font_h+3 >
416 rb->screens[l]->getheight()) { 394 rb->screens[l]->getheight()) {
417 param[l].font = rb->font_get(FONT_SYSFIXED); 395 param[l].font = rb->font_get(FONT_SYSFIXED);
418 param[l].font_h = param[l].font->height; 396 param[l].font_h = param[l].font->height;
@@ -492,10 +470,10 @@ int zx_kbd_input(char* text/*, int buflen*/)
492 param[l].lines = param[l].DEFAULT_LINES; 470 param[l].lines = param[l].DEFAULT_LINES;
493 param[l].keyboard_margin = DEFAULT_MARGIN; 471 param[l].keyboard_margin = DEFAULT_MARGIN;
494 } else { 472 } else {
495 param[l].lines = (rb->screens[l]->lcdheight - BUTTONBAR_HEIGHT - 473 param[l].lines = (rb->screens[l]->lcdheight -
496 statusbar_size) / param[l].font_h - 1; 474 statusbar_size) / param[l].font_h - 1;
497 param[l].keyboard_margin = rb->screens[l]->lcdheight - 475 param[l].keyboard_margin = rb->screens[l]->lcdheight -
498 BUTTONBAR_HEIGHT - statusbar_size - 476 statusbar_size -
499 (param[l].lines+1)*param[l].font_h; 477 (param[l].lines+1)*param[l].font_h;
500 if (param[l].keyboard_margin < 3) { 478 if (param[l].keyboard_margin < 3) {
501 param[l].lines--; 479 param[l].lines--;