Attempt to support 1.13+ sub-pixel cursor

This commit is contained in:
SerpentSpirale 2021-10-23 16:13:26 +02:00
parent d183c991a0
commit 156f414cfc
6 changed files with 8 additions and 15 deletions

View file

@ -444,8 +444,8 @@ public class BaseMainActivity extends LoggableActivity {
case MotionEvent.ACTION_MOVE:
if (!CallbackBridge.isGrabbing() && e.getPointerCount() >= 2 && !LauncherPreferences.PREF_DISABLE_GESTURES) { //Scrolling feature
CallbackBridge.sendScroll(Tools.pxToDp(mouse_x - scrollInitialX)/30 , Tools.pxToDp(mouse_y - scrollInitialY)/30);
scrollInitialX = (int)mouse_x;
scrollInitialY = (int)mouse_y;
scrollInitialX = mouse_x;
scrollInitialY = mouse_y;
} else if (!CallbackBridge.isGrabbing() && e.getPointerCount() == 1) { //Touch hover
CallbackBridge.sendCursorPos(mouse_x, mouse_y);
prevX = e.getX();