fix[TouchController]: Fixed TouchController proxy thread not being run

This commit is contained in:
fifth_light 2025-07-16 22:36:03 +08:00
parent 71a28fa5fb
commit cd0f40f377
No known key found for this signature in database
GPG Key ID: 980E55EC56F8AFA5
2 changed files with 2 additions and 1 deletions

View File

@ -203,8 +203,8 @@ public class MinecraftGLSurface extends View implements GrabListener, DirectGame
CallbackBridge.sendCursorPos( e.getX(i) * LauncherPreferences.PREF_SCALE_FACTOR, e.getY(i) * LauncherPreferences.PREF_SCALE_FACTOR);
return true; //mouse event handled successfully
}
if (mIngameProcessor == null || mInGUIProcessor == null) return true;
TouchControllerUtils.processTouchEvent(e, this);
if (mIngameProcessor == null || mInGUIProcessor == null) return true;
return mCurrentTouchProcessor.processTouchEvent(e);
}

View File

@ -104,6 +104,7 @@ public class TouchControllerUtils {
}
MessageTransport transport = UnixSocketTransportKt.UnixSocketTransport(socketName);
proxyClient = new LauncherProxyClient(transport);
proxyClient.run();
Vibrator vibrator = ContextCompat.getSystemService(context, Vibrator.class);
if (vibrator != null) {
LauncherProxyClient.VibrationHandler vibrationHandler = new VibrationHandler(vibrator);