diff options
| -rw-r--r-- | src/core/hid/input_converter.cpp | 4 | ||||
| -rw-r--r-- | src/yuzu/configuration/configure_input_player.cpp | 23 |
2 files changed, 24 insertions, 3 deletions
diff --git a/src/core/hid/input_converter.cpp b/src/core/hid/input_converter.cpp index ee228e39b..3c26260f3 100644 --- a/src/core/hid/input_converter.cpp +++ b/src/core/hid/input_converter.cpp | |||
| @@ -327,7 +327,7 @@ void SanitizeStick(Common::Input::AnalogStatus& analog_x, Common::Input::AnalogS | |||
| 327 | raw_y += properties_y.offset; | 327 | raw_y += properties_y.offset; |
| 328 | 328 | ||
| 329 | // Apply X scale correction from offset | 329 | // Apply X scale correction from offset |
| 330 | if (std::abs(properties_x.offset) < 0.5f) { | 330 | if (std::abs(properties_x.offset) < 0.75f) { |
| 331 | if (raw_x > 0) { | 331 | if (raw_x > 0) { |
| 332 | raw_x /= 1 + properties_x.offset; | 332 | raw_x /= 1 + properties_x.offset; |
| 333 | } else { | 333 | } else { |
| @@ -336,7 +336,7 @@ void SanitizeStick(Common::Input::AnalogStatus& analog_x, Common::Input::AnalogS | |||
| 336 | } | 336 | } |
| 337 | 337 | ||
| 338 | // Apply Y scale correction from offset | 338 | // Apply Y scale correction from offset |
| 339 | if (std::abs(properties_y.offset) < 0.5f) { | 339 | if (std::abs(properties_y.offset) < 0.75f) { |
| 340 | if (raw_y > 0) { | 340 | if (raw_y > 0) { |
| 341 | raw_y /= 1 + properties_y.offset; | 341 | raw_y /= 1 + properties_y.offset; |
| 342 | } else { | 342 | } else { |
diff --git a/src/yuzu/configuration/configure_input_player.cpp b/src/yuzu/configuration/configure_input_player.cpp index cb622bc37..1c05dd0f3 100644 --- a/src/yuzu/configuration/configure_input_player.cpp +++ b/src/yuzu/configuration/configure_input_player.cpp | |||
| @@ -520,7 +520,28 @@ ConfigureInputPlayer::ConfigureInputPlayer(QWidget* parent, std::size_t player_i | |||
| 520 | QMenu context_menu; | 520 | QMenu context_menu; |
| 521 | Common::ParamPackage param = emulated_controller->GetStickParam(analog_id); | 521 | Common::ParamPackage param = emulated_controller->GetStickParam(analog_id); |
| 522 | context_menu.addAction(tr("Clear"), [&] { | 522 | context_menu.addAction(tr("Clear"), [&] { |
| 523 | emulated_controller->SetStickParam(analog_id, {}); | 523 | if (param.Get("engine", "") != "analog_from_button") { |
| 524 | emulated_controller->SetStickParam(analog_id, {}); | ||
| 525 | for (auto button : analog_map_buttons[analog_id]) { | ||
| 526 | button->setText(tr("[not set]")); | ||
| 527 | } | ||
| 528 | return; | ||
| 529 | } | ||
| 530 | switch (sub_button_id) { | ||
| 531 | case 0: | ||
| 532 | param.Erase("up"); | ||
| 533 | break; | ||
| 534 | case 1: | ||
| 535 | param.Erase("down"); | ||
| 536 | break; | ||
| 537 | case 2: | ||
| 538 | param.Erase("left"); | ||
| 539 | break; | ||
| 540 | case 3: | ||
| 541 | param.Erase("right"); | ||
| 542 | break; | ||
| 543 | } | ||
| 544 | emulated_controller->SetStickParam(analog_id, param); | ||
| 524 | analog_map_buttons[analog_id][sub_button_id]->setText(tr("[not set]")); | 545 | analog_map_buttons[analog_id][sub_button_id]->setText(tr("[not set]")); |
| 525 | }); | 546 | }); |
| 526 | context_menu.addAction(tr("Center axis"), [&] { | 547 | context_menu.addAction(tr("Center axis"), [&] { |