diff options
author | CJBok <cjbok@ziggo.nl> | 2020-01-03 09:11:34 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-03 09:11:34 +0100 |
commit | 351e3fb72e8b3a913cf221d4e3b3c5128395857c (patch) | |
tree | c5e97268f840fddfd064f0b17be103dc93624b45 /src | |
parent | Added deadzone controls for sdl engine at input settings (diff) | |
download | yuzu-351e3fb72e8b3a913cf221d4e3b3c5128395857c.tar yuzu-351e3fb72e8b3a913cf221d4e3b3c5128395857c.tar.gz yuzu-351e3fb72e8b3a913cf221d4e3b3c5128395857c.tar.bz2 yuzu-351e3fb72e8b3a913cf221d4e3b3c5128395857c.tar.lz yuzu-351e3fb72e8b3a913cf221d4e3b3c5128395857c.tar.xz yuzu-351e3fb72e8b3a913cf221d4e3b3c5128395857c.tar.zst yuzu-351e3fb72e8b3a913cf221d4e3b3c5128395857c.zip |
Diffstat (limited to 'src')
-rw-r--r-- | src/yuzu/configuration/configure_input_player.cpp | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/src/yuzu/configuration/configure_input_player.cpp b/src/yuzu/configuration/configure_input_player.cpp index 9fc443809..aa58bc19e 100644 --- a/src/yuzu/configuration/configure_input_player.cpp +++ b/src/yuzu/configuration/configure_input_player.cpp @@ -248,23 +248,23 @@ ConfigureInputPlayer::ConfigureInputPlayer(QWidget* parent, std::size_t player_i button->setContextMenuPolicy(Qt::CustomContextMenu); connect(button, &QPushButton::clicked, [=] { HandleClick(button_map[button_id], - [=](Common::ParamPackage params) { - // Workaround for ZL & ZR for analog triggers like on XBOX controllors. - // Analog triggers (from controllers like the XBOX controller) would not - // work due to a different range of their signals (from 0 to 255 on - // analog triggers instead of -32768 to 32768 on analog joysticks). The - // SDL driver misinterprets analog triggers as analog joysticks. - // TODO: reinterpret the signal range for analog triggers to map the - // values correctly. This is required for the correct emulation of the - // analog triggers of the GameCube controller. - if (button_id == Settings::NativeButton::ZL || - button_id == Settings::NativeButton::ZR) { - params.Set("direction", "+"); - params.Set("threshold", "0.5"); - } - buttons_param[button_id] = std::move(params); - }, - InputCommon::Polling::DeviceType::Button); + [=](Common::ParamPackage params) { + // Workaround for ZL & ZR for analog triggers like on XBOX controllors. + // Analog triggers (from controllers like the XBOX controller) would not + // work due to a different range of their signals (from 0 to 255 on + // analog triggers instead of -32768 to 32768 on analog joysticks). The + // SDL driver misinterprets analog triggers as analog joysticks. + // TODO: reinterpret the signal range for analog triggers to map the + // values correctly. This is required for the correct emulation of the + // analog triggers of the GameCube controller. + if (button_id == Settings::NativeButton::ZL || + button_id == Settings::NativeButton::ZR) { + params.Set("direction", "+"); + params.Set("threshold", "0.5"); + } + buttons_param[button_id] = std::move(params); + }, + InputCommon::Polling::DeviceType::Button); }); connect(button, &QPushButton::customContextMenuRequested, [=](const QPoint& menu_location) { QMenu context_menu; @@ -291,11 +291,11 @@ ConfigureInputPlayer::ConfigureInputPlayer(QWidget* parent, std::size_t player_i analog_button->setContextMenuPolicy(Qt::CustomContextMenu); connect(analog_button, &QPushButton::clicked, [=]() { HandleClick(analog_map_buttons[analog_id][sub_button_id], - [=](const Common::ParamPackage& params) { - SetAnalogButton(params, analogs_param[analog_id], - analog_sub_buttons[sub_button_id]); - }, - InputCommon::Polling::DeviceType::Button); + [=](const Common::ParamPackage& params) { + SetAnalogButton(params, analogs_param[analog_id], + analog_sub_buttons[sub_button_id]); + }, + InputCommon::Polling::DeviceType::Button); }); connect(analog_button, &QPushButton::customContextMenuRequested, [=](const QPoint& menu_location) { @@ -595,4 +595,4 @@ void ConfigureInputPlayer::keyPressEvent(QKeyEvent* event) { } } SetPollingResult({}, true); -}
\ No newline at end of file +} |