mirror of
https://github.com/AngelAuraMC/Amethyst-Android.git
synced 2025-09-16 16:16:04 -04:00
Fix back button to right mouse button conversion
This commit is contained in:
parent
c0e4d45ff3
commit
2041834e6f
@ -451,12 +451,15 @@ public class MainActivity extends BaseActivity {
|
||||
@Override
|
||||
public boolean dispatchKeyEvent(KeyEvent event) {
|
||||
if(isInEditor) return super.dispatchKeyEvent(event);
|
||||
boolean handleEvent;
|
||||
if(!(handleEvent = minecraftGLView.processKeyEvent(event))) {
|
||||
if (event.getKeyCode() == KeyEvent.KEYCODE_BACK && !touchCharInput.isEnabled()) {
|
||||
if(event.getAction() != KeyEvent.ACTION_UP) return true; // We eat it anyway
|
||||
sendKeyPress(LwjglGlfwKeycode.GLFW_KEY_ESCAPE);
|
||||
return true;
|
||||
}
|
||||
return minecraftGLView.processKeyEvent(event);
|
||||
}
|
||||
return handleEvent;
|
||||
}
|
||||
|
||||
public static void switchKeyboardState() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user