From 84148a0da00fdedd5ddff91691f2210746f94714 Mon Sep 17 00:00:00 2001 From: Scott Wichser Date: Tue, 8 Aug 2023 06:28:15 -0500 Subject: [PATCH] In Input Settings, match the joystick device based on index. This can end up selecting a different joystick than the user had selected if the order of connected joysticks change. However, this matches the logic in SDLJoystick , so it's at least consistent now. --- src/bzflag/InputMenu.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bzflag/InputMenu.cxx b/src/bzflag/InputMenu.cxx index b4a94c2f82..1e3afaa7ab 100644 --- a/src/bzflag/InputMenu.cxx +++ b/src/bzflag/InputMenu.cxx @@ -72,7 +72,7 @@ InputMenu::InputMenu() : keyboardMapMenu(nullptr), joystickTestMenu(nullptr) joystickDevices.erase(joystickDevices.begin(), joystickDevices.end()); for (i = 0; i < (int)options->size(); i++) { - if ((*options)[i].compare(currentJoystickDevice) == 0) + if ((*options)[i].compare(0, 1, currentJoystickDevice, 0, 1) == 0) { option->setIndex(i); break;