input: Fix bitwise operation for button mask (#1851)
Some checks failed
Build check / build (push) Has been cancelled
Generate translation template / generate-pot (push) Has been cancelled

Fixes classic controller buttons which were shifted beyond 32bit range
This commit is contained in:
Squall Leonhart
2026-03-29 17:56:12 +11:00
committed by GitHub
parent 6648a9c225
commit 2913a8ca7a

View File

@@ -232,7 +232,7 @@ ControllerState NativeWiimoteController::raw_state()
for (int i = 0; i < std::numeric_limits<uint64>::digits; i++)
{
// OR with base buttons
if((buttons & (1 << i)))
if((buttons & (1ULL << i)))
result.buttons.SetButtonState(i, true);
}
result.axis = classic.left_axis;