comparison render_sdl.c @ 1861:fc05f49075c2

Reprocess bindings when SDL2 mappings, controller types or controller order change
author Michael Pavone <pavone@retrodev.com>
date Fri, 03 May 2019 18:56:12 -0700
parents bdca98187c9f
children e07fc3d473b2
comparison
equal deleted inserted replaced
1860:bdca98187c9f 1861:fc05f49075c2
948 joystick_sdl_index[joystick] = joystick_sdl_index[desired_index]; 948 joystick_sdl_index[joystick] = joystick_sdl_index[desired_index];
949 joystick_index_locked[joystick] = joystick_sdl_index[desired_index]; 949 joystick_index_locked[joystick] = joystick_sdl_index[desired_index];
950 joysticks[desired_index] = tmp_joy; 950 joysticks[desired_index] = tmp_joy;
951 joystick_sdl_index[desired_index] = tmp_index; 951 joystick_sdl_index[desired_index] = tmp_index;
952 joystick_index_locked[desired_index] = 1; 952 joystick_index_locked[desired_index] = 1;
953 //update bindings as the controllers being swapped may have different mappings
954 handle_joy_added(desired_index);
955 if (joysticks[joystick]) {
956 handle_joy_added(joystick);
957 }
953 return desired_index; 958 return desired_index;
954 } 959 }
955 960
956 static int32_t handle_event(SDL_Event *event) 961 static int32_t handle_event(SDL_Event *event)
957 { 962 {