Add horizontal scrolling in mouse emulation mode

This commit is contained in:
Cameron Gutman 2023-03-04 12:31:31 -06:00
parent 0b581011c5
commit 19b6e94824

View File

@ -900,6 +900,16 @@ public class ControllerHandler implements InputManager.InputDeviceListener, UsbD
conn.sendMouseScroll((byte) -1);
}
}
if ((changedMask & ControllerPacket.RIGHT_FLAG) != 0) {
if ((inputMap & ControllerPacket.RIGHT_FLAG) != 0) {
conn.sendMouseHScroll((byte) 1);
}
}
if ((changedMask & ControllerPacket.LEFT_FLAG) != 0) {
if ((inputMap & ControllerPacket.LEFT_FLAG) != 0) {
conn.sendMouseHScroll((byte) -1);
}
}
conn.sendControllerInput(controllerNumber, getActiveControllerMask(),
(short)0, (byte)0, (byte)0, (short)0, (short)0, (short)0, (short)0);