diff options
| author | 2020-01-03 09:11:34 +0100 | |
|---|---|---|
| committer | 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.gz yuzu-351e3fb72e8b3a913cf221d4e3b3c5128395857c.tar.xz yuzu-351e3fb72e8b3a913cf221d4e3b3c5128395857c.zip | |
Update configure_input_player.cpp
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 | |||
| 248 | button->setContextMenuPolicy(Qt::CustomContextMenu); | 248 | button->setContextMenuPolicy(Qt::CustomContextMenu); |
| 249 | connect(button, &QPushButton::clicked, [=] { | 249 | connect(button, &QPushButton::clicked, [=] { |
| 250 | HandleClick(button_map[button_id], | 250 | HandleClick(button_map[button_id], |
| 251 | [=](Common::ParamPackage params) { | 251 | [=](Common::ParamPackage params) { |
| 252 | // Workaround for ZL & ZR for analog triggers like on XBOX controllors. | 252 | // Workaround for ZL & ZR for analog triggers like on XBOX controllors. |
| 253 | // Analog triggers (from controllers like the XBOX controller) would not | 253 | // Analog triggers (from controllers like the XBOX controller) would not |
| 254 | // work due to a different range of their signals (from 0 to 255 on | 254 | // work due to a different range of their signals (from 0 to 255 on |
| 255 | // analog triggers instead of -32768 to 32768 on analog joysticks). The | 255 | // analog triggers instead of -32768 to 32768 on analog joysticks). The |
| 256 | // SDL driver misinterprets analog triggers as analog joysticks. | 256 | // SDL driver misinterprets analog triggers as analog joysticks. |
| 257 | // TODO: reinterpret the signal range for analog triggers to map the | 257 | // TODO: reinterpret the signal range for analog triggers to map the |
| 258 | // values correctly. This is required for the correct emulation of the | 258 | // values correctly. This is required for the correct emulation of the |
| 259 | // analog triggers of the GameCube controller. | 259 | // analog triggers of the GameCube controller. |
| 260 | if (button_id == Settings::NativeButton::ZL || | 260 | if (button_id == Settings::NativeButton::ZL || |
| 261 | button_id == Settings::NativeButton::ZR) { | 261 | button_id == Settings::NativeButton::ZR) { |
| 262 | params.Set("direction", "+"); | 262 | params.Set("direction", "+"); |
| 263 | params.Set("threshold", "0.5"); | 263 | params.Set("threshold", "0.5"); |
| 264 | } | 264 | } |
| 265 | buttons_param[button_id] = std::move(params); | 265 | buttons_param[button_id] = std::move(params); |
| 266 | }, | 266 | }, |
| 267 | InputCommon::Polling::DeviceType::Button); | 267 | InputCommon::Polling::DeviceType::Button); |
| 268 | }); | 268 | }); |
| 269 | connect(button, &QPushButton::customContextMenuRequested, [=](const QPoint& menu_location) { | 269 | connect(button, &QPushButton::customContextMenuRequested, [=](const QPoint& menu_location) { |
| 270 | QMenu context_menu; | 270 | QMenu context_menu; |
| @@ -291,11 +291,11 @@ ConfigureInputPlayer::ConfigureInputPlayer(QWidget* parent, std::size_t player_i | |||
| 291 | analog_button->setContextMenuPolicy(Qt::CustomContextMenu); | 291 | analog_button->setContextMenuPolicy(Qt::CustomContextMenu); |
| 292 | connect(analog_button, &QPushButton::clicked, [=]() { | 292 | connect(analog_button, &QPushButton::clicked, [=]() { |
| 293 | HandleClick(analog_map_buttons[analog_id][sub_button_id], | 293 | HandleClick(analog_map_buttons[analog_id][sub_button_id], |
| 294 | [=](const Common::ParamPackage& params) { | 294 | [=](const Common::ParamPackage& params) { |
| 295 | SetAnalogButton(params, analogs_param[analog_id], | 295 | SetAnalogButton(params, analogs_param[analog_id], |
| 296 | analog_sub_buttons[sub_button_id]); | 296 | analog_sub_buttons[sub_button_id]); |
| 297 | }, | 297 | }, |
| 298 | InputCommon::Polling::DeviceType::Button); | 298 | InputCommon::Polling::DeviceType::Button); |
| 299 | }); | 299 | }); |
| 300 | connect(analog_button, &QPushButton::customContextMenuRequested, | 300 | connect(analog_button, &QPushButton::customContextMenuRequested, |
| 301 | [=](const QPoint& menu_location) { | 301 | [=](const QPoint& menu_location) { |
| @@ -595,4 +595,4 @@ void ConfigureInputPlayer::keyPressEvent(QKeyEvent* event) { | |||
| 595 | } | 595 | } |
| 596 | } | 596 | } |
| 597 | SetPollingResult({}, true); | 597 | SetPollingResult({}, true); |
| 598 | } \ No newline at end of file | 598 | } |