Hotfix for mouse passthrough slight jump

This commit is contained in:
SerpentSpirale 2021-08-01 21:51:51 +02:00
parent bd22317639
commit b9afe4f6b9
2 changed files with 5 additions and 1 deletions

View File

@ -348,7 +348,7 @@ public class BaseMainActivity extends LoggableActivity {
switch (e.getActionMasked()) {
case MotionEvent.ACTION_DOWN: // 0
shouldBeDown = true;
//shouldBeDown = true;
CallbackBridge.sendPrepareGrabInitialPos();
currentPointerID = e.getPointerId(0);

View File

@ -262,6 +262,10 @@ public class ControlButton extends androidx.appcompat.widget.AppCompatButton imp
case MotionEvent.ACTION_UP: // 1
case MotionEvent.ACTION_CANCEL: // 3
case MotionEvent.ACTION_POINTER_UP: // 6
if(mProperties.passThruEnabled){
MinecraftGLView v = ((ControlLayout) this.getParent()).findViewById(R.id.main_game_render_view);
if (v != null) v.dispatchTouchEvent(event);
}
if(isPointerOutOfBounds) ((ControlLayout) getParent()).onTouch(this, event);
isPointerOutOfBounds = false;