mirror of
https://github.com/mauiaaron/apple2.git
synced 2025-01-09 14:29:23 +00:00
Meager support for Android joystick/gamepad keys
This commit is contained in:
parent
e165da72fc
commit
1e573c34ad
@ -40,6 +40,17 @@ void android_keycode_to_emulator(int keyCode, int metaState, bool pressed) {
|
||||
break;
|
||||
}
|
||||
|
||||
switch (keyCode) {
|
||||
case KEYCODE_BUTTON_A:
|
||||
case KEYCODE_BUTTON_X:
|
||||
joydriver_setButton0Pressed(pressed);
|
||||
return;
|
||||
case KEYCODE_BUTTON_B:
|
||||
case KEYCODE_BUTTON_Y:
|
||||
joydriver_setButton1Pressed(pressed);
|
||||
return;
|
||||
}
|
||||
|
||||
switch (keyCode) {
|
||||
case KEYCODE_0:
|
||||
key = _is_shifted(metaState) ? ')' : keyCode + ASCII_0_OFFSET;
|
||||
|
@ -98,6 +98,8 @@
|
||||
#define KEYCODE_BUTTON_L2 0x68
|
||||
#define KEYCODE_BUTTON_R1 0x67
|
||||
#define KEYCODE_BUTTON_R2 0x69
|
||||
#define KEYCODE_BUTTON_X 0x63
|
||||
#define KEYCODE_BUTTON_Y 0x64
|
||||
|
||||
#define META_ALT_LEFT_ON 0x00000010
|
||||
#define META_ALT_RIGHT_ON 0x00000020
|
||||
|
Loading…
Reference in New Issue
Block a user