diff render_sdl.c @ 2239:b2f788f08a31

Fix bug in controller reordering implementation
author Michael Pavone <pavone@retrodev.com>
date Sat, 17 Sep 2022 23:08:24 -0700
parents f11f4399d64b
children eb45ad9d8a3f
line wrap: on
line diff
--- a/render_sdl.c	Sat Sep 17 18:29:24 2022 -0700
+++ b/render_sdl.c	Sat Sep 17 23:08:24 2022 -0700
@@ -798,7 +798,7 @@
 	int tmp_index = joystick_sdl_index[joystick];
 	joysticks[joystick] = joysticks[desired_index];
 	joystick_sdl_index[joystick] = joystick_sdl_index[desired_index];
-	joystick_index_locked[joystick] = joystick_sdl_index[desired_index];
+	joystick_index_locked[joystick] = joystick_index_locked[desired_index];
 	joysticks[desired_index] = tmp_joy;
 	joystick_sdl_index[desired_index] = tmp_index;
 	joystick_index_locked[desired_index] = 1;