Add left analog bind to D-PAD for joystick.

This commit is contained in:
Edênis Freindorfer Azevedo 2019-07-20 23:30:23 -03:00 committed by Rafael Kitover
parent 6de45d4ed2
commit 770b9c1cf8
1 changed files with 11 additions and 0 deletions

View File

@ -160,6 +160,15 @@ wxJoyKeyBinding defkeys_joystick[NUM_KEYS] = {
WJKB(0), WJKB(0), WJKB(0)
};
wxJoyKeyBinding extrakeys_joystick[NUM_KEYS] = {
WJKB(1, WXJB_AXIS_MINUS, 1), WJKB(1, WXJB_AXIS_PLUS, 1), WJKB(0, WXJB_AXIS_MINUS, 1), WJKB(0, WXJB_AXIS_PLUS, 1),
WJKB(0), WJKB(0), WJKB(0), WJKB(0),
WJKB(0), WJKB(0),
WJKB(0), WJKB(0), WJKB(0), WJKB(0),
WJKB(0), WJKB(0), WJKB(0), WJKB(0),
WJKB(0), WJKB(0), WJKB(0)
};
wxAcceleratorEntry_v sys_accels;
// Initializer for struct opt_desc
@ -373,6 +382,8 @@ void set_default_keys()
gopts.joykey_bindings[0][i].push_back(defkeys_keyboard[i]);
if (defkeys_joystick[i].joy)
gopts.joykey_bindings[0][i].push_back(defkeys_joystick[i]);
if (extrakeys_joystick[i].joy)
gopts.joykey_bindings[0][i].push_back(extrakeys_joystick[i]);
}
}