mirror of
https://github.com/2009scape/2009Scape-mobile.git
synced 2025-12-20 21:40:15 -07:00
Fix mouse lag once and for all
This commit is contained in:
parent
734599ed32
commit
125be60e6f
1 changed files with 46 additions and 48 deletions
|
|
@ -492,10 +492,8 @@ public class BaseMainActivity extends LoggableActivity {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onCapturedPointer (View view, MotionEvent e) {
|
public boolean onCapturedPointer (View view, MotionEvent e) {
|
||||||
if(e.getHistorySize() > 0) {
|
|
||||||
mouse_x += (e.getX()*scaleFactor);
|
mouse_x += (e.getX()*scaleFactor);
|
||||||
mouse_y += (e.getY()*scaleFactor);
|
mouse_y += (e.getY()*scaleFactor);
|
||||||
}
|
|
||||||
CallbackBridge.mouseX = (int) mouse_x;
|
CallbackBridge.mouseX = (int) mouse_x;
|
||||||
CallbackBridge.mouseY = (int) mouse_y;
|
CallbackBridge.mouseY = (int) mouse_y;
|
||||||
if(!CallbackBridge.isGrabbing()){
|
if(!CallbackBridge.isGrabbing()){
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue