mirror of
https://github.com/AngelAuraMC/Amethyst-Android.git
synced 2025-09-16 08:05:34 -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
|
@Override
|
||||||
public boolean dispatchKeyEvent(KeyEvent event) {
|
public boolean dispatchKeyEvent(KeyEvent event) {
|
||||||
if(isInEditor) return super.dispatchKeyEvent(event);
|
if(isInEditor) return super.dispatchKeyEvent(event);
|
||||||
if (event.getKeyCode() == KeyEvent.KEYCODE_BACK && !touchCharInput.isEnabled()) {
|
boolean handleEvent;
|
||||||
if(event.getAction() != KeyEvent.ACTION_UP) return true; // We eat it anyway
|
if(!(handleEvent = minecraftGLView.processKeyEvent(event))) {
|
||||||
sendKeyPress(LwjglGlfwKeycode.GLFW_KEY_ESCAPE);
|
if (event.getKeyCode() == KeyEvent.KEYCODE_BACK && !touchCharInput.isEnabled()) {
|
||||||
return true;
|
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() {
|
public static void switchKeyboardState() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user