You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if (event.code==REL_WHEEL) platform.eventWheelMove.y+=event.value;
654
+
}
655
+
656
+
// Absolute movement parsing
657
+
if (event.type==EV_ABS)
658
+
{
659
+
// Basic movement
660
+
if (event.code==ABS_X)
661
+
{
662
+
CORE.Input.Mouse.currentPosition.x= (event.value-platform.absRange.x)*CORE.Window.screen.width/platform.absRange.width; // Scale according to absRange
663
+
CORE.Input.Touch.position[0].x= (event.value-platform.absRange.x)*CORE.Window.screen.width/platform.absRange.width; // Scale according to absRange
664
+
665
+
touchAction=2; // TOUCH_ACTION_MOVE
666
+
gestureUpdate= true;
667
+
}
668
+
669
+
if (event.code==ABS_Y)
670
+
{
671
+
CORE.Input.Mouse.currentPosition.y= (event.value-platform.absRange.y)*CORE.Window.screen.height/platform.absRange.height; // Scale according to absRange
672
+
CORE.Input.Touch.position[0].y= (event.value-platform.absRange.y)*CORE.Window.screen.height/platform.absRange.height; // Scale according to absRange
673
+
674
+
touchAction=2; // TOUCH_ACTION_MOVE
675
+
gestureUpdate= true;
676
+
}
677
+
678
+
// Multitouch movement
679
+
if (event.code==ABS_MT_SLOT) platform.touchSlot=event.value; // Remember the slot number for the folowing events
680
+
681
+
if (event.code==ABS_MT_POSITION_X)
682
+
{
683
+
if (platform.touchSlot<MAX_TOUCH_POINTS) CORE.Input.Touch.position[platform.touchSlot].x= (event.value-platform.absRange.x)*CORE.Window.screen.width/platform.absRange.width; // Scale according to absRange
684
+
}
685
+
686
+
if (event.code==ABS_MT_POSITION_Y)
687
+
{
688
+
if (platform.touchSlot<MAX_TOUCH_POINTS) CORE.Input.Touch.position[platform.touchSlot].y= (event.value-platform.absRange.y)*CORE.Window.screen.height/platform.absRange.height; // Scale according to absRange
689
+
}
690
+
691
+
if (event.code==ABS_MT_TRACKING_ID)
692
+
{
693
+
if ((event.value<0) && (platform.touchSlot<MAX_TOUCH_POINTS))
if (event.value>0) touchAction=1; // TOUCH_ACTION_DOWN
734
+
elsetouchAction=0; // TOUCH_ACTION_UP
735
+
gestureUpdate= true;
736
+
}
737
+
738
+
if (event.code==BTN_RIGHT) platform.currentButtonStateEvdev[MOUSE_BUTTON_RIGHT] =event.value;
739
+
if (event.code==BTN_MIDDLE) platform.currentButtonStateEvdev[MOUSE_BUTTON_MIDDLE] =event.value;
740
+
if (event.code==BTN_SIDE) platform.currentButtonStateEvdev[MOUSE_BUTTON_SIDE] =event.value;
741
+
if (event.code==BTN_EXTRA) platform.currentButtonStateEvdev[MOUSE_BUTTON_EXTRA] =event.value;
742
+
if (event.code==BTN_FORWARD) platform.currentButtonStateEvdev[MOUSE_BUTTON_FORWARD] =event.value;
743
+
if (event.code==BTN_BACK) platform.currentButtonStateEvdev[MOUSE_BUTTON_BACK] =event.value;
744
+
}
745
+
746
+
// Screen confinement
747
+
if (!CORE.Input.Mouse.cursorHidden)
748
+
{
749
+
if (CORE.Input.Mouse.currentPosition.x<0) CORE.Input.Mouse.currentPosition.x=0;
750
+
if (CORE.Input.Mouse.currentPosition.x>CORE.Window.screen.width/CORE.Input.Mouse.scale.x) CORE.Input.Mouse.currentPosition.x=CORE.Window.screen.width/CORE.Input.Mouse.scale.x;
751
+
752
+
if (CORE.Input.Mouse.currentPosition.y<0) CORE.Input.Mouse.currentPosition.y=0;
753
+
if (CORE.Input.Mouse.currentPosition.y>CORE.Window.screen.height/CORE.Input.Mouse.scale.y) CORE.Input.Mouse.currentPosition.y=CORE.Window.screen.height/CORE.Input.Mouse.scale.y;
754
+
}
755
+
756
+
// Update touch point count
757
+
CORE.Input.Touch.pointCount=0;
758
+
for (inti=0; i<MAX_TOUCH_POINTS; i++)
759
+
{
760
+
if (CORE.Input.Touch.position[i].x >= 0) CORE.Input.Touch.pointCount++;
0 commit comments