Skip to content

Commit

Permalink
Add left analog bind to D-PAD for joystick.
Browse files Browse the repository at this point in the history
  • Loading branch information
denisfa authored and rkitover committed Jul 25, 2019
1 parent 6de45d4 commit 770b9c1
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/wx/opts.cpp
Expand Up @@ -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
Expand Down Expand Up @@ -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]);
}
}

Expand Down

0 comments on commit 770b9c1

Please sign in to comment.