We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a33721c commit 56c4c6dCopy full SHA for 56c4c6d
src/main.rs
@@ -214,11 +214,11 @@ fn main() -> ! {
214
}
215
if index < 2 {
216
// Actual buttons
217
- report.buttons = 1 << index;
+ report.buttons |= 1 << index;
218
} else if index < 2 + 4 {
219
- report.buttons = 1 << (index + 2);
+ report.buttons |= 1 << (index + 2);
220
} else if index < 2 + 4 + 1 {
221
- report.misc_buttons = 1 << 4;
+ report.misc_buttons |= 1 << 4;
222
} else if index < 2 + 4 + 1 + 4 {
223
// Joysticks
224
let value = if index & 1 == 1 { i16::MAX } else { i16::MIN };
0 commit comments