mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-20 05:16:01 +00:00
Fix multiple controller discovery (#614)
This commit is contained in:
1 parent
aa901c3902
commit
d71178c955
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
|
||||
|
||||
Reference in new issue
Block a user