Fix: crash on virtual mouse enabled on start

This commit is contained in:
Mathias-Boulay 2023-02-26 12:22:30 +01:00
parent 67fc3f5740
commit da7dd201f2

View file

@ -184,8 +184,9 @@ public class MainActivity extends BaseActivity implements ControlButtonMenuListe
minecraftGLView.setSurfaceReadyListener(() -> {
try {
// Setup virtual mouse right before launching
if (PREF_VIRTUAL_MOUSE_START)
touchpad.switchState();
if (PREF_VIRTUAL_MOUSE_START) {
touchpad.post(() -> touchpad.switchState());
}
runCraft();
}catch (Throwable e){