yuzu-emu
/
yuzu-android
Archived
1
0
Fork 0

fixed clang format & addressed feedback

This commit is contained in:
FreddyFunk 2019-10-10 23:27:00 +02:00
parent a31c6b2c4e
commit be5dc68ca3
1 changed files with 24 additions and 26 deletions

View File

@ -245,23 +245,22 @@ ConfigureInputPlayer::ConfigureInputPlayer(QWidget* parent, std::size_t player_i
button->setContextMenuPolicy(Qt::CustomContextMenu); button->setContextMenuPolicy(Qt::CustomContextMenu);
connect(button, &QPushButton::clicked, [=] { connect(button, &QPushButton::clicked, [=] {
HandleClick( HandleClick(button_map[button_id],
button_map[button_id],
[=](Common::ParamPackage params) { [=](Common::ParamPackage params) {
// Workaround for ZL & ZR for analog triggers like on XBOX controllors. // Workaround for ZL & ZR for analog triggers like on XBOX controllors.
// Analog triggers (from controllers like the XBOX controller) would not work // Analog triggers (from controllers like the XBOX controller) would not
// due to a different range of their signals (from 0 to 255 on analog triggers // work due to a different range of their signals (from 0 to 255 on
// instead of -32768 to 32768 on analog joysticks). The SDL driver misinterprets // analog triggers instead of -32768 to 32768 on analog joysticks). The
// analog triggers as analog joysticks. // SDL driver misinterprets analog triggers as analog joysticks.
// TODO: reinterpret the signal range for analog triggers to map the values // TODO: reinterpret the signal range for analog triggers to map the
// correctly. This is required for the correct emulation of the analog triggers // values correctly. This is required for the correct emulation of the
// of the GameCube controller. // analog triggers of the GameCube controller.
if (button_id == Settings::NativeButton::ZL || if (button_id == Settings::NativeButton::ZL ||
button_id == Settings::NativeButton::ZR) { button_id == Settings::NativeButton::ZR) {
params.Set("direction", "+"); params.Set("direction", "+");
params.Set("threshold", "0.5"); params.Set("threshold", "0.5");
} }
buttons_param[button_id] = params; buttons_param[button_id] = std::move(params);
}, },
InputCommon::Polling::DeviceType::Button); InputCommon::Polling::DeviceType::Button);
}); });
@ -289,8 +288,7 @@ ConfigureInputPlayer::ConfigureInputPlayer(QWidget* parent, std::size_t player_i
analog_button->setContextMenuPolicy(Qt::CustomContextMenu); analog_button->setContextMenuPolicy(Qt::CustomContextMenu);
connect(analog_button, &QPushButton::clicked, [=]() { connect(analog_button, &QPushButton::clicked, [=]() {
HandleClick( HandleClick(analog_map_buttons[analog_id][sub_button_id],
analog_map_buttons[analog_id][sub_button_id],
[=](const Common::ParamPackage& params) { [=](const Common::ParamPackage& params) {
SetAnalogButton(params, analogs_param[analog_id], SetAnalogButton(params, analogs_param[analog_id],
analog_sub_buttons[sub_button_id]); analog_sub_buttons[sub_button_id]);