aboutsummaryrefslogtreecommitdiff
path: root/src/frontend/qt_sdl/InputConfigDialog.cpp
diff options
context:
space:
mode:
authorArisotura <thetotalworm@gmail.com>2020-05-28 16:07:34 +0200
committerArisotura <thetotalworm@gmail.com>2020-05-28 16:07:34 +0200
commitd1d572210fdcef0932aaa2f0c6df71f6f2161c75 (patch)
treec80d3d0eb2145b48162e4418b08167d43f4a4f59 /src/frontend/qt_sdl/InputConfigDialog.cpp
parentd25dc40e70e9a1c25966db8e16a5efd5284fd336 (diff)
fix that bug here too
Diffstat (limited to 'src/frontend/qt_sdl/InputConfigDialog.cpp')
-rw-r--r--src/frontend/qt_sdl/InputConfigDialog.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/frontend/qt_sdl/InputConfigDialog.cpp b/src/frontend/qt_sdl/InputConfigDialog.cpp
index 2c0afc4..81baa65 100644
--- a/src/frontend/qt_sdl/InputConfigDialog.cpp
+++ b/src/frontend/qt_sdl/InputConfigDialog.cpp
@@ -199,6 +199,9 @@ void InputConfigDialog::on_InputConfigDialog_rejected()
void InputConfigDialog::on_cbxJoystick_currentIndexChanged(int id)
{
+ // prevent a spurious change
+ if (ui->cbxJoystick->count() < 2) return;
+
Input::JoystickID = id;
Input::OpenJoystick();
}