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

@@ -257,6 +257,14 @@ public final class PadBridge {
return false;
}
/** Publishes every currently connected controller so the client can enumerate all players. */
public synchronized void syncConnectedControllers() {
for (int deviceId : InputDevice.getDeviceIds()) {
InputDevice device = InputDevice.getDevice(deviceId);
if (isFromController(device)) publish(slotFor(device));
}
}
/**
* Called (main thread) when a player presses a button, pushes a stick, trigger or d-pad past
* halfway, or uses the on-screen controls - the session hides its mouse cursor then. Resting