Merge pull request #2830 from FearlessTobi/port-4911

Port citra-emu/citra#4911: "Add cancel option to analog stick configuration"
This commit is contained in:
David 2019-09-05 09:53:44 +10:00 committed by GitHub
commit a956d0b0eb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -301,13 +301,16 @@ ConfigureInputPlayer::ConfigureInputPlayer(QWidget* parent, std::size_t player_i
}); });
} }
connect(analog_map_stick[analog_id], &QPushButton::clicked, [=] { connect(analog_map_stick[analog_id], &QPushButton::clicked, [=] {
QMessageBox::information(this, tr("Information"), if (QMessageBox::information(
tr("After pressing OK, first move your joystick horizontally, " this, tr("Information"),
"and then vertically.")); tr("After pressing OK, first move your joystick horizontally, "
HandleClick( "and then vertically."),
analog_map_stick[analog_id], QMessageBox::Ok | QMessageBox::Cancel) == QMessageBox::Ok) {
[=](const Common::ParamPackage& params) { analogs_param[analog_id] = params; }, HandleClick(
InputCommon::Polling::DeviceType::Analog); analog_map_stick[analog_id],
[=](const Common::ParamPackage& params) { analogs_param[analog_id] = params; },
InputCommon::Polling::DeviceType::Analog);
}
}); });
} }