XInput: Fix trigger magnitude being doubled

This commit is contained in:
Connor McLaughlin 2021-03-16 01:00:34 +10:00
parent b828ac89f4
commit 299ba60b8d
1 changed files with 2 additions and 2 deletions

View File

@ -126,12 +126,12 @@ void XInputControllerInterface::CheckForStateChanges(u32 index, const XINPUT_STA
} }
if (ogp.bLeftTrigger != ngp.bLeftTrigger) if (ogp.bLeftTrigger != ngp.bLeftTrigger)
{ {
HandleAxisEvent(index, Axis::LeftTrigger, static_cast<s32>(ZeroExtend32(ngp.bLeftTrigger) << 8)); HandleAxisEvent(index, Axis::LeftTrigger, static_cast<s32>(ZeroExtend32(ngp.bLeftTrigger) << 7));
ogp.bLeftTrigger = ngp.bLeftTrigger; ogp.bLeftTrigger = ngp.bLeftTrigger;
} }
if (ogp.bRightTrigger != ngp.bRightTrigger) if (ogp.bRightTrigger != ngp.bRightTrigger)
{ {
HandleAxisEvent(index, Axis::RightTrigger, static_cast<s32>(ZeroExtend32(ngp.bRightTrigger) << 8)); HandleAxisEvent(index, Axis::RightTrigger, static_cast<s32>(ZeroExtend32(ngp.bRightTrigger) << 7));
ogp.bRightTrigger = ngp.bRightTrigger; ogp.bRightTrigger = ngp.bRightTrigger;
} }