input: Fix bitwise operation for button mask (#1851)

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
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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;