mirror of
https://github.com/PabloMK7/citra.git
synced 2024-11-26 17:34:04 +00:00
qt/config_input: don't connect for null button
This commit is contained in:
parent
5a692ddaec
commit
b5faa68120
1 changed files with 7 additions and 4 deletions
|
@ -79,13 +79,16 @@ ConfigureInput::ConfigureInput(QWidget* parent)
|
||||||
|
|
||||||
for (int analog_id = 0; analog_id < Settings::NativeAnalog::NumAnalogs; analog_id++) {
|
for (int analog_id = 0; analog_id < Settings::NativeAnalog::NumAnalogs; analog_id++) {
|
||||||
for (int sub_button_id = 0; sub_button_id < ANALOG_SUB_BUTTONS_NUM; sub_button_id++) {
|
for (int sub_button_id = 0; sub_button_id < ANALOG_SUB_BUTTONS_NUM; sub_button_id++) {
|
||||||
|
if (analog_map[analog_id][sub_button_id] != nullptr) {
|
||||||
connect(analog_map[analog_id][sub_button_id], &QPushButton::released, [=]() {
|
connect(analog_map[analog_id][sub_button_id], &QPushButton::released, [=]() {
|
||||||
handleClick(analog_map[analog_id][sub_button_id], [=](int key) {
|
handleClick(analog_map[analog_id][sub_button_id], [=](int key) {
|
||||||
SetAnalogKey(key, analogs_param[analog_id], analog_sub_buttons[sub_button_id]);
|
SetAnalogKey(key, analogs_param[analog_id],
|
||||||
|
analog_sub_buttons[sub_button_id]);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
connect(ui->buttonRestoreDefaults, &QPushButton::released, [this]() { restoreDefaults(); });
|
connect(ui->buttonRestoreDefaults, &QPushButton::released, [this]() { restoreDefaults(); });
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue