diff options
author | Michael Pavone <pavone@retrodev.com> | 2019-05-03 18:56:12 -0700 |
---|---|---|
committer | Michael Pavone <pavone@retrodev.com> | 2019-05-03 18:56:12 -0700 |
commit | fb7c8ebe5b784e2bd5c8983565f4314ced2e58b7 (patch) | |
tree | ff082350f23f738e528a33e3136a209206aba6b9 /render_sdl.c | |
parent | a1d601525430ab4ac811b2d077716a02320d0e9a (diff) |
Reprocess bindings when SDL2 mappings, controller types or controller order change
Diffstat (limited to 'render_sdl.c')
-rwxr-xr-x | render_sdl.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/render_sdl.c b/render_sdl.c index 50e9019..f1c8153 100755 --- a/render_sdl.c +++ b/render_sdl.c @@ -950,6 +950,11 @@ int lock_joystick_index(int joystick, int desired_index) joysticks[desired_index] = tmp_joy; joystick_sdl_index[desired_index] = tmp_index; joystick_index_locked[desired_index] = 1; + //update bindings as the controllers being swapped may have different mappings + handle_joy_added(desired_index); + if (joysticks[joystick]) { + handle_joy_added(joystick); + } return desired_index; } |