mirror of
https://github.com/gdsports/USBHost_t36
synced 2024-11-16 22:25:23 -05:00
Fix compiler warnings
This commit is contained in:
parent
99ec892dd7
commit
6938b46086
@ -134,13 +134,13 @@ void MouseController::new_data(const Transfer_t *transfer)
|
|||||||
|
|
||||||
if(packetSize == 20) {
|
if(packetSize == 20) {
|
||||||
buttons = report[1];
|
buttons = report[1];
|
||||||
mouseX = ((report[4] & 0x0f) << 8 | (report[3] & 0xff));
|
mouseX = ((report[4] & 0x0f) << 8) | ((report[3] & 0xff));
|
||||||
mouseY = ((report[5] & 0xff) << 4 | (report[4] >> 4) & 0x0f);
|
mouseY = ((report[5] & 0xff) << 4) | ((report[4] >> 4) & 0x0f);
|
||||||
wheel = report[6];
|
wheel = report[6];
|
||||||
} else {
|
} else {
|
||||||
buttons = report[0];
|
buttons = report[0];
|
||||||
mouseX = ((report[2] & 0x0f) << 8 | (report[1] & 0xff));
|
mouseX = ((report[2] & 0x0f) << 8) | ((report[1] & 0xff));
|
||||||
mouseY = ((report[3] & 0xff) << 4 | (report[2] >> 4) & 0x0f);
|
mouseY = ((report[3] & 0xff) << 4) | ((report[2] >> 4) & 0x0f);
|
||||||
wheel = report[4];
|
wheel = report[4];
|
||||||
}
|
}
|
||||||
mouseEvent = true;
|
mouseEvent = true;
|
||||||
|
Loading…
Reference in New Issue
Block a user