Fix hardware mouse not working on some devices

This commit is contained in:
SerpentSpirale 2021-09-01 21:58:13 +02:00
parent b3135aa735
commit 428e99d013

View File

@ -602,7 +602,10 @@ public class BaseMainActivity extends LoggableActivity {
} }
if(mouseCursorIndex == -1) return false; // we cant consoom that, theres no mice! if(mouseCursorIndex == -1) return false; // we cant consoom that, theres no mice!
if(CallbackBridge.isGrabbing()) { if(CallbackBridge.isGrabbing()) {
if(BaseMainActivity.isAndroid8OrHigher()) minecraftGLView.requestPointerCapture(); if(BaseMainActivity.isAndroid8OrHigher()){
minecraftGLView.requestFocus();
minecraftGLView.requestPointerCapture();
}
} }
switch(ev.getActionMasked()) { switch(ev.getActionMasked()) {
case MotionEvent.ACTION_HOVER_MOVE: case MotionEvent.ACTION_HOVER_MOVE: