Joystick code improvements
This commit is contained in:
@@ -87,9 +87,9 @@ SettingsInput::onCurrentMachineChanged(int machineId)
|
||||
mouseModel->removeRows(0, removeRows);
|
||||
ui->comboBoxMouse->setCurrentIndex(selectedRow);
|
||||
|
||||
int i = 0;
|
||||
char *joyName = joystick_get_name(i);
|
||||
auto *joystickModel = ui->comboBoxJoystick->model();
|
||||
int i = 0;
|
||||
const char *joyName = joystick_get_name(i);
|
||||
auto *joystickModel = ui->comboBoxJoystick->model();
|
||||
removeRows = joystickModel->rowCount();
|
||||
selectedRow = 0;
|
||||
while (joyName) {
|
||||
@@ -116,7 +116,7 @@ void
|
||||
SettingsInput::on_comboBoxJoystick_currentIndexChanged(int index)
|
||||
{
|
||||
int joystickId = ui->comboBoxJoystick->currentData().toInt();
|
||||
for (int i = 0; i < 4; ++i) {
|
||||
for (int i = 0; i < MAX_JOYSTICKS; ++i) {
|
||||
auto *btn = findChild<QPushButton *>(QString("pushButtonJoystick%1").arg(i + 1));
|
||||
if (btn == nullptr) {
|
||||
continue;
|
||||
|
||||
Reference in New Issue
Block a user