forked from len0rd/rockbox
iPod: Initial attempt at button mappings for plugins. All plugins now compile, but more work is needed with the more complex ones to make them iPod friendly
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8233 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
c75425511e
commit
54d44c893f
28 changed files with 361 additions and 65 deletions
|
@ -946,6 +946,7 @@ STATIC void chip8 (void)
|
|||
|
||||
/* variable button definitions */
|
||||
#if CONFIG_KEYPAD == RECORDER_PAD /* only 9 out of 16 chip8 buttons */
|
||||
#define CHIP8_OFF BUTTON_OFF
|
||||
#define CHIP8_KEY1 BUTTON_F1
|
||||
#define CHIP8_KEY2 BUTTON_UP
|
||||
#define CHIP8_KEY3 BUTTON_F3
|
||||
|
@ -957,6 +958,7 @@ STATIC void chip8 (void)
|
|||
#define CHIP8_KEY9 BUTTON_ON
|
||||
|
||||
#elif CONFIG_KEYPAD == ONDIO_PAD /* even more limited */
|
||||
#define CHIP8_OFF BUTTON_OFF
|
||||
#define CHIP8_KEY2 BUTTON_UP
|
||||
#define CHIP8_KEY4 BUTTON_LEFT
|
||||
#define CHIP8_KEY5 BUTTON_MENU
|
||||
|
@ -965,12 +967,21 @@ STATIC void chip8 (void)
|
|||
|
||||
#elif (CONFIG_KEYPAD == IRIVER_H100_PAD) || \
|
||||
(CONFIG_KEYPAD == IRIVER_H300_PAD)
|
||||
#define CHIP8_OFF BUTTON_OFF
|
||||
#define CHIP8_KEY2 BUTTON_UP
|
||||
#define CHIP8_KEY4 BUTTON_LEFT
|
||||
#define CHIP8_KEY5 BUTTON_SELECT
|
||||
#define CHIP8_KEY6 BUTTON_RIGHT
|
||||
#define CHIP8_KEY8 BUTTON_DOWN
|
||||
|
||||
#elif (CONFIG_KEYPAD == IPOD_4G_PAD) || (CONFIG_KEYPAD == IPOD_NANO_PAD)
|
||||
#define CHIP8_OFF BUTTON_MENU
|
||||
#define CHIP8_KEY2 BUTTON_SCROLL_BACK
|
||||
#define CHIP8_KEY4 BUTTON_LEFT
|
||||
#define CHIP8_KEY5 BUTTON_PLAY
|
||||
#define CHIP8_KEY6 BUTTON_RIGHT
|
||||
#define CHIP8_KEY8 BUTTON_SCROLL_FWD
|
||||
|
||||
#endif
|
||||
|
||||
static byte chip8_virtual_keys[16];
|
||||
|
@ -1076,7 +1087,7 @@ static void chip8_keyboard(void)
|
|||
int button = rb->button_get(false);
|
||||
switch (button)
|
||||
{
|
||||
case BUTTON_OFF: /* Abort Emulator */
|
||||
case CHIP8_OFF: /* Abort Emulator */
|
||||
chip8_running = 0;
|
||||
break;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue