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(() -> { minecraftGLView.setSurfaceReadyListener(() -> {
try { try {
// Setup virtual mouse right before launching // Setup virtual mouse right before launching
if (PREF_VIRTUAL_MOUSE_START) if (PREF_VIRTUAL_MOUSE_START) {
touchpad.switchState(); touchpad.post(() -> touchpad.switchState());
}
runCraft(); runCraft();
}catch (Throwable e){ }catch (Throwable e){