Send fractional scroll events properly

This commit is contained in:
Cameron Gutman
2021-12-08 22:11:44 -06:00
parent 54bc34496a
commit da45cba2ff

View File

@@ -1308,8 +1308,7 @@ public class Game extends Activity implements SurfaceHolder.Callback,
if (event.getActionMasked() == MotionEvent.ACTION_SCROLL) {
// Send the vertical scroll packet
byte vScrollClicks = (byte) event.getAxisValue(MotionEvent.AXIS_VSCROLL);
conn.sendMouseScroll(vScrollClicks);
conn.sendMouseHighResScroll((short)(event.getAxisValue(MotionEvent.AXIS_VSCROLL) * 120));
}
if ((changedButtons & MotionEvent.BUTTON_PRIMARY) != 0) {