mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-14 13:27:45 -07:00
ControllerEmu: Change trigger threshold check to >= instead of > and set minimum threshold in UI to 1% to prevent user error.
This commit is contained in:
parent
d6e10e586a
commit
ccdce615ec
@ -28,7 +28,7 @@ MixedTriggers::MixedTriggers(const std::string& name_)
|
|||||||
_trans("%"),
|
_trans("%"),
|
||||||
// i18n: Refers to the "threshold" setting for pressure sensitive gamepad inputs.
|
// i18n: Refers to the "threshold" setting for pressure sensitive gamepad inputs.
|
||||||
_trans("Input strength required for activation.")},
|
_trans("Input strength required for activation.")},
|
||||||
90, 0, 100);
|
90, 1, 100);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MixedTriggers::GetState(u16* const digital, const u16* bitmasks, ControlState* analog,
|
void MixedTriggers::GetState(u16* const digital, const u16* bitmasks, ControlState* analog,
|
||||||
@ -51,7 +51,7 @@ void MixedTriggers::GetState(u16* const digital, const u16* bitmasks, ControlSta
|
|||||||
std::min(ApplyDeadzone(controls[trigger_count + i]->GetState(), deadzone), 1.0);
|
std::min(ApplyDeadzone(controls[trigger_count + i]->GetState(), deadzone), 1.0);
|
||||||
|
|
||||||
// Apply threshold:
|
// Apply threshold:
|
||||||
if (button_value > threshold)
|
if (button_value >= threshold)
|
||||||
{
|
{
|
||||||
// Fully activate analog:
|
// Fully activate analog:
|
||||||
analog_value = 1.0;
|
analog_value = 1.0;
|
||||||
@ -87,7 +87,7 @@ void MixedTriggers::GetState(u16* digital, const u16* bitmasks, ControlState* an
|
|||||||
ControlState analog_value = ApplyDeadzone(controls[trigger_count + i]->GetState(), deadzone);
|
ControlState analog_value = ApplyDeadzone(controls[trigger_count + i]->GetState(), deadzone);
|
||||||
|
|
||||||
// Apply threshold:
|
// Apply threshold:
|
||||||
if (button_value > threshold)
|
if (button_value >= threshold)
|
||||||
{
|
{
|
||||||
analog_value = 1.0;
|
analog_value = 1.0;
|
||||||
button_bool = true;
|
button_bool = true;
|
||||||
|
Loading…
Reference in New Issue
Block a user