2
1
Fork 0
mirror of https://github.com/yuzu-emu/yuzu.git synced 2024-07-04 23:31:19 +01:00

qt/config_input: don't connect for null button

This commit is contained in:
wwylele 2017-03-02 13:29:28 +02:00
parent 5a692ddaec
commit b5faa68120

View file

@ -79,11 +79,14 @@ 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++) {
connect(analog_map[analog_id][sub_button_id], &QPushButton::released, [=]() { if (analog_map[analog_id][sub_button_id] != nullptr) {
handleClick(analog_map[analog_id][sub_button_id], [=](int key) { connect(analog_map[analog_id][sub_button_id], &QPushButton::released, [=]() {
SetAnalogKey(key, analogs_param[analog_id], analog_sub_buttons[sub_button_id]); handleClick(analog_map[analog_id][sub_button_id], [=](int key) {
SetAnalogKey(key, analogs_param[analog_id],
analog_sub_buttons[sub_button_id]);
});
}); });
}); }
} }
} }