From 2913a8ca7aa5568f4b7b572a57cef83384f69f06 Mon Sep 17 00:00:00 2001 From: Squall Leonhart Date: Sun, 29 Mar 2026 17:56:12 +1100 Subject: [PATCH] input: Fix bitwise operation for button mask (#1851) Fixes classic controller buttons which were shifted beyond 32bit range --- src/input/api/Wiimote/NativeWiimoteController.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/input/api/Wiimote/NativeWiimoteController.cpp b/src/input/api/Wiimote/NativeWiimoteController.cpp index 9aa56d9c..75025e09 100644 --- a/src/input/api/Wiimote/NativeWiimoteController.cpp +++ b/src/input/api/Wiimote/NativeWiimoteController.cpp @@ -232,7 +232,7 @@ ControllerState NativeWiimoteController::raw_state() for (int i = 0; i < std::numeric_limits::digits; i++) { // OR with base buttons - if((buttons & (1 << i))) + if((buttons & (1ULL << i))) result.buttons.SetButtonState(i, true); } result.axis = classic.left_axis;