From 01b0a3bcfa48422289dab9df7af88eda52e80d9d Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Fri, 3 Jan 2014 20:47:55 +0100 Subject: initialize joylist in right order. pad out device list. --- ftnoir_tracker_joystick/ftnoir_tracker_joystick_dialog.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/ftnoir_tracker_joystick/ftnoir_tracker_joystick_dialog.cpp b/ftnoir_tracker_joystick/ftnoir_tracker_joystick_dialog.cpp index 812ad454..a22c90f4 100644 --- a/ftnoir_tracker_joystick/ftnoir_tracker_joystick_dialog.cpp +++ b/ftnoir_tracker_joystick/ftnoir_tracker_joystick_dialog.cpp @@ -19,7 +19,6 @@ TrackerControls::TrackerControls() : tracker(nullptr) connect(ui.buttonBox, SIGNAL(accepted()), this, SLOT(doOK())); connect(ui.buttonBox, SIGNAL(rejected()), this, SLOT(doCancel())); - tie_setting(s.joyid, ui.joylist); tie_setting(s.axis_0, ui.comboBox); tie_setting(s.axis_1, ui.comboBox_2); tie_setting(s.axis_2, ui.comboBox_3); @@ -45,6 +44,15 @@ fin: if (g_pDI) g_pDI->Release(); } + + for (int i = ui.joylist->count(); i < 8; i++) + { + GUID dummy = {0}; + guids.push_back(dummy); + ui.joylist->addItem("Nonexistent"); + } + + tie_setting(s.joyid, ui.joylist); } void TrackerControls::doOK() { -- cgit v1.2.3