Fix multiple controller discovery (#614)

This commit is contained in:
Neolyum authored and GitHub committed 2026-10-12 11:45:00 +00:00
1 parent cebad5692d
commit b25c4ea26b
3 files changed
+16 -1

No files matched your search

@@ -338,6 +338,7 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback {
private val deviceListener = object : InputManager.InputDeviceListener {
override fun onInputDeviceAdded(deviceId: Int) {
logInputDevice("connected", deviceId)
padBridge?.syncConnectedControllers()
updateOnScreenControls()
updatePointerCapture()
}
@@ -2407,6 +2408,7 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback {
}
(getSystemService(INPUT_SERVICE) as? InputManager)
?.registerInputDeviceListener(deviceListener, Handler(Looper.getMainLooper()))
if (SessionState.guestPid > 1) padBridge?.syncConnectedControllers()
onScreenControls?.reload()
controllerSettings = ControllerPrefs.read(this)
updateOnScreenControls()